Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-07-11 05:39:09 -0400
committercletavernie2013-07-11 05:39:09 -0400
commit4760888429f1e10c1abd70d4b46b7a9ccbeb1eed (patch)
tree7bcb7ed4c77f2fb33fac321a1a775034ed61389d /examples
parent3559d81c557eec5606ee712dfaf44b273e84ec92 (diff)
downloadorg.eclipse.papyrus-4760888429f1e10c1abd70d4b46b7a9ccbeb1eed.tar.gz
org.eclipse.papyrus-4760888429f1e10c1abd70d4b46b7a9ccbeb1eed.tar.xz
org.eclipse.papyrus-4760888429f1e10c1abd70d4b46b7a9ccbeb1eed.zip
[SVN] Move examples to the right folder
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/.classpath7
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/.project28
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/META-INF/MANIFEST.MF17
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/about.html28
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/build.properties23
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.ecore10
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.genmodel16
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/plugin.pdoc4
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/plugin.properties13
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/plugin.xml26
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrusTextInstance.java115
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java52
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstancePackage.java226
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java289
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java105
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java218
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java149
-rw-r--r--examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java137
18 files changed, 1463 insertions, 0 deletions
diff --git a/examples/org.eclipse.papyrus.example.text.instance/.classpath b/examples/org.eclipse.papyrus.example.text.instance/.classpath
new file mode 100644
index 00000000000..45f024e850e
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/.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/org.eclipse.papyrus.example.text.instance/.project b/examples/org.eclipse.papyrus.example.text.instance/.project
new file mode 100644
index 00000000000..1f1bbbf348a
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.example.text.instance</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/META-INF/MANIFEST.MF b/examples/org.eclipse.papyrus.example.text.instance/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..58af6e537bd
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.example.text.instance.papyrustextinstance,
+ org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl,
+ org.eclipse.papyrus.example.text.instance.papyrustextinstance.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.example.text.instance;singlet
+ on:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/examples/org.eclipse.papyrus.example.text.instance/about.html b/examples/org.eclipse.papyrus.example.text.instance/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/build.properties b/examples/org.eclipse.papyrus.example.text.instance/build.properties
new file mode 100644
index 00000000000..6672f2400bf
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/build.properties
@@ -0,0 +1,23 @@
+# Copyright (c) 2012 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ about.html,\
+ plugin.pdoc,\
+ plugin.properties,\
+ build.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.ecore b/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.ecore
new file mode 100644
index 00000000000..1efefbcdd3e
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.ecore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="papyrustextinstance" nsURI="http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance"
+ nsPrefix="papyrustextinstance">
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusTextInstance" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="editedObject" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.genmodel b/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.genmodel
new file mode 100644
index 00000000000..02d981047ff
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/model/papyrustextinstance.genmodel
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=" Copyright (c) 2012 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA; Contributors:&#xD;&#xA; Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation&#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.example.text.instance/src" modelPluginID="org.eclipse.papyrus.example.text.instance"
+ modelName="Papyrustextinstance" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
+ <foreignModel>papyrustextinstance.ecore</foreignModel>
+ <genPackages prefix="Papyrustextinstance" basePackage="org.eclipse.papyrus.example.test.instance"
+ disposableProviderFactory="true" ecorePackage="papyrustextinstance.ecore#/">
+ <genClasses ecoreClass="papyrustextinstance.ecore#//PapyrusTextInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustextinstance.ecore#//PapyrusTextInstance/editedObject"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustextinstance.ecore#//PapyrusTextInstance/type"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustextinstance.ecore#//PapyrusTextInstance/name"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/plugin.pdoc b/examples/org.eclipse.papyrus.example.text.instance/plugin.pdoc
new file mode 100644
index 00000000000..e59da2f931a
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the content model for the papyrus text editor">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/plugin.properties b/examples/org.eclipse.papyrus.example.text.instance/plugin.properties
new file mode 100644
index 00000000000..fa4bae9bc58
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/plugin.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2012 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+#
+
+pluginName = Papyrus Text Editor Example (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/examples/org.eclipse.papyrus.example.text.instance/plugin.xml b/examples/org.eclipse.papyrus.example.text.instance/plugin.xml
new file mode 100644
index 00000000000..35c4d727312
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance"
+ class="org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage"
+ genModel="model/papyrustextinstance.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrusTextInstance.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrusTextInstance.java
new file mode 100644
index 00000000000..bfc86b555f1
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrusTextInstance.java
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Text Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}</li>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance()
+ * @model
+ * @generated
+ */
+public interface PapyrusTextInstance extends EModelElement {
+ /**
+ * Returns the value of the '<em><b>Edited Object</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edited Object</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Edited Object</em>' reference.
+ * @see #setEditedObject(EObject)
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_EditedObject()
+ * @model
+ * @generated
+ */
+ EObject getEditedObject();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edited Object</em>' reference.
+ * @see #getEditedObject()
+ * @generated
+ */
+ void setEditedObject(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // PapyrusTextInstance
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java
new file mode 100644
index 00000000000..b63d4820bdc
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage
+ * @generated
+ */
+public interface PapyrustextinstanceFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustextinstanceFactory eINSTANCE = org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrustextinstanceFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Text Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Text Instance</em>'.
+ * @generated
+ */
+ PapyrusTextInstance createPapyrusTextInstance();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PapyrustextinstancePackage getPapyrustextinstancePackage();
+
+} //PapyrustextinstanceFactory
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstancePackage.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstancePackage.java
new file mode 100644
index 00000000000..098e6014f2e
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/PapyrustextinstancePackage.java
@@ -0,0 +1,226 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstanceFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PapyrustextinstancePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "papyrustextinstance";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "papyrustextinstance";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustextinstancePackage eINSTANCE = org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl <em>Papyrus Text Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl#getPapyrusTextInstance()
+ * @generated
+ */
+ int PAPYRUS_TEXT_INSTANCE = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TEXT_INSTANCE__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Edited Object</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TEXT_INSTANCE__TYPE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TEXT_INSTANCE__NAME = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Text Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TEXT_INSTANCE_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance <em>Papyrus Text Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Text Instance</em>'.
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance
+ * @generated
+ */
+ EClass getPapyrusTextInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Edited Object</em>'.
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject()
+ * @see #getPapyrusTextInstance()
+ * @generated
+ */
+ EReference getPapyrusTextInstance_EditedObject();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getType()
+ * @see #getPapyrusTextInstance()
+ * @generated
+ */
+ EAttribute getPapyrusTextInstance_Type();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance#getName()
+ * @see #getPapyrusTextInstance()
+ * @generated
+ */
+ EAttribute getPapyrusTextInstance_Name();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ PapyrustextinstanceFactory getPapyrustextinstanceFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl <em>Papyrus Text Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl#getPapyrusTextInstance()
+ * @generated
+ */
+ EClass PAPYRUS_TEXT_INSTANCE = eINSTANCE.getPapyrusTextInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Edited Object</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT = eINSTANCE.getPapyrusTextInstance_EditedObject();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TEXT_INSTANCE__TYPE = eINSTANCE.getPapyrusTextInstance_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TEXT_INSTANCE__NAME = eINSTANCE.getPapyrusTextInstance_Name();
+
+ }
+
+} //PapyrustextinstancePackage
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java
new file mode 100644
index 00000000000..ac9c90a6d53
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java
@@ -0,0 +1,289 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EModelElementImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance;
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Text Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getEditedObject <em>Edited Object</em>}</li>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusTextInstanceImpl extends EModelElementImpl implements PapyrusTextInstance {
+ /**
+ * The cached value of the '{@link #getEditedObject() <em>Edited Object</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEditedObject()
+ * @generated
+ * @ordered
+ */
+ protected EObject editedObject;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTextInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrustextinstancePackage.Literals.PAPYRUS_TEXT_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getEditedObject() {
+ if (editedObject != null && editedObject.eIsProxy()) {
+ InternalEObject oldEditedObject = (InternalEObject)editedObject;
+ editedObject = eResolveProxy(oldEditedObject);
+ if (editedObject != oldEditedObject) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT, oldEditedObject, editedObject));
+ }
+ }
+ return editedObject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetEditedObject() {
+ return editedObject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEditedObject(EObject newEditedObject) {
+ EObject oldEditedObject = editedObject;
+ editedObject = newEditedObject;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT, oldEditedObject, editedObject));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
+ if (resolve) return getEditedObject();
+ return basicGetEditedObject();
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
+ return getType();
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
+ setEditedObject((EObject)newValue);
+ return;
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
+ setType((String)newValue);
+ return;
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
+ setEditedObject((EObject)null);
+ return;
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
+ return editedObject != null;
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (type: ");
+ result.append(type);
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusTextInstanceImpl
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java
new file mode 100644
index 00000000000..109a41b16f6
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustextinstanceFactoryImpl extends EFactoryImpl implements PapyrustextinstanceFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PapyrustextinstanceFactory init() {
+ try {
+ PapyrustextinstanceFactory thePapyrustextinstanceFactory = (PapyrustextinstanceFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance");
+ if (thePapyrustextinstanceFactory != null) {
+ return thePapyrustextinstanceFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PapyrustextinstanceFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustextinstanceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE: return createPapyrusTextInstance();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTextInstance createPapyrusTextInstance() {
+ PapyrusTextInstanceImpl papyrusTextInstance = new PapyrusTextInstanceImpl();
+ return papyrusTextInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustextinstancePackage getPapyrustextinstancePackage() {
+ return (PapyrustextinstancePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PapyrustextinstancePackage getPackage() {
+ return PapyrustextinstancePackage.eINSTANCE;
+ }
+
+} //PapyrustextinstanceFactoryImpl
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java
new file mode 100644
index 00000000000..88af35e9cfc
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java
@@ -0,0 +1,218 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance;
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstanceFactory;
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustextinstancePackageImpl extends EPackageImpl implements PapyrustextinstancePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusTextInstanceEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PapyrustextinstancePackageImpl() {
+ super(eNS_URI, PapyrustextinstanceFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link PapyrustextinstancePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static PapyrustextinstancePackage init() {
+ if (isInited) return (PapyrustextinstancePackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustextinstancePackage.eNS_URI);
+
+ // Obtain or create and register package
+ PapyrustextinstancePackageImpl thePapyrustextinstancePackage = (PapyrustextinstancePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PapyrustextinstancePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PapyrustextinstancePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ EcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ thePapyrustextinstancePackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePapyrustextinstancePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePapyrustextinstancePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PapyrustextinstancePackage.eNS_URI, thePapyrustextinstancePackage);
+ return thePapyrustextinstancePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusTextInstance() {
+ return papyrusTextInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTextInstance_EditedObject() {
+ return (EReference)papyrusTextInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTextInstance_Type() {
+ return (EAttribute)papyrusTextInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTextInstance_Name() {
+ return (EAttribute)papyrusTextInstanceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustextinstanceFactory getPapyrustextinstanceFactory() {
+ return (PapyrustextinstanceFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusTextInstanceEClass = createEClass(PAPYRUS_TEXT_INSTANCE);
+ createEReference(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT);
+ createEAttribute(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__TYPE);
+ createEAttribute(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusTextInstanceEClass.getESuperTypes().add(theEcorePackage.getEModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(papyrusTextInstanceEClass, PapyrusTextInstance.class, "PapyrusTextInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPapyrusTextInstance_EditedObject(), theEcorePackage.getEObject(), null, "editedObject", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPapyrusTextInstance_Type(), ecorePackage.getEString(), "type", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPapyrusTextInstance_Name(), ecorePackage.getEString(), "name", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //PapyrustextinstancePackageImpl
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java
new file mode 100644
index 00000000000..43e0df23636
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage
+ * @generated
+ */
+public class PapyrustextinstanceAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustextinstancePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustextinstanceAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustextinstancePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrustextinstanceSwitch<Adapter> modelSwitch =
+ new PapyrustextinstanceSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusTextInstance(PapyrusTextInstance object) {
+ return createPapyrusTextInstanceAdapter();
+ }
+ @Override
+ public Adapter caseEModelElement(EModelElement object) {
+ return createEModelElementAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance <em>Papyrus Text Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance
+ * @generated
+ */
+ public Adapter createPapyrusTextInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EModelElement
+ * @generated
+ */
+ public Adapter createEModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //PapyrustextinstanceAdapterFactory
diff --git a/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java
new file mode 100644
index 00000000000..9807eb9bf56
--- /dev/null
+++ b/examples/org.eclipse.papyrus.example.text.instance/src/org/eclipse/papyrus/example/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java
@@ -0,0 +1,137 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.example.text.instance.papyrustextinstance.util;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.example.text.instance.papyrustextinstance.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstancePackage
+ * @generated
+ */
+public class PapyrustextinstanceSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustextinstancePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustextinstanceSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustextinstancePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE: {
+ PapyrusTextInstance papyrusTextInstance = (PapyrusTextInstance)theEObject;
+ T result = casePapyrusTextInstance(papyrusTextInstance);
+ if (result == null) result = caseEModelElement(papyrusTextInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Text Instance</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Text Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusTextInstance(PapyrusTextInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEModelElement(EModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //PapyrustextinstanceSwitch

Back to the top