Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreperico2009-12-04 05:37:36 -0500
committereperico2009-12-04 05:37:36 -0500
commit764af3d1300b1bf0dda397d1194f01d6f6d96ed5 (patch)
tree6640ff60008cf4430bb0129b8ea979b078034e4b /plugins/profile-tool/org.eclipse.papyrus.resource
parent0994e8904673c94ccfaddbd03df1f30316a9d0d3 (diff)
downloadorg.eclipse.papyrus-764af3d1300b1bf0dda397d1194f01d6f6d96ed5.tar.gz
org.eclipse.papyrus-764af3d1300b1bf0dda397d1194f01d6f6d96ed5.tar.xz
org.eclipse.papyrus-764af3d1300b1bf0dda397d1194f01d6f6d96ed5.zip
Task 296901: [Profile] provide a way to generate profile based diagram
Diffstat (limited to 'plugins/profile-tool/org.eclipse.papyrus.resource')
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/.classpath7
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/.project28
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.gmf.bridge.ui.dashboard.prefs7
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/META-INF/MANIFEST.MF15
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/Resource.classbin0 -> 318 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceEObject.classbin0 -> 177 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceFactory.classbin0 -> 736 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage$Literals.classbin0 -> 804 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage.classbin0 -> 1225 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.classbin0 -> 751 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.classbin0 -> 2884 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceImpl.classbin0 -> 2472 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.classbin0 -> 3891 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory$1.classbin0 -> 1969 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.classbin0 -> 2040 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceSwitch.classbin0 -> 3058 bytes
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/build.properties21
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecore12
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecorediag37
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.genmodel16
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/plugin.properties8
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/plugin.xml20
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java52
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java28
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java60
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java199
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java50
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java117
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java150
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java216
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java146
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java154
33 files changed, 1346 insertions, 0 deletions
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/.classpath b/plugins/profile-tool/org.eclipse.papyrus.resource/.classpath
new file mode 100644
index 00000000000..45f024e850e
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/.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/plugins/profile-tool/org.eclipse.papyrus.resource/.project b/plugins/profile-tool/org.eclipse.papyrus.resource/.project
new file mode 100644
index 00000000000..081156992b1
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.resource</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.core.resources.prefs b/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..b2c5fda8ba9
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Oct 01 10:44:12 CEST 2009
+eclipse.preferences.version=1
+encoding//model/resource.ecorediag=UTF-8
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.gmf.bridge.ui.dashboard.prefs b/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.gmf.bridge.ui.dashboard.prefs
new file mode 100644
index 00000000000..ccfe18588c1
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/.settings/org.eclipse.gmf.bridge.ui.dashboard.prefs
@@ -0,0 +1,7 @@
+#Thu Oct 01 11:12:06 CEST 2009
+eclipse.preferences.version=1
+gmf_dashboard/domainGenerationModel=platform\:/resource/org.eclipse.papyrus.sysml/model/SysML.profile.genmodel
+gmf_dashboard/domainModel=platform\:/resource/org.eclipse.papyrus.sysml/model/sysml.ecore
+gmf_dashboard/graphicalDefinitionModel=platform\:/resource/org.eclipse.papyrus.sysml/model/sysml.gmfgraph
+gmf_dashboard/mappingModel=platform\:/resource/org.eclipse.papyrus.sysml/model/sysm1.gmfmap
+gmf_dashboard/toolingDefinitionModel=platform\:/resource/org.eclipse.papyrus.sysml/model/sysml.gmftool
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/META-INF/MANIFEST.MF b/plugins/profile-tool/org.eclipse.papyrus.resource/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..c7410ccf469
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.resource;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.resource,
+ org.eclipse.papyrus.resource.impl,
+ org.eclipse.papyrus.resource.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/Resource.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/Resource.class
new file mode 100644
index 00000000000..f28a263afe1
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/Resource.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceEObject.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceEObject.class
new file mode 100644
index 00000000000..0ca7a1e5c85
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceEObject.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceFactory.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceFactory.class
new file mode 100644
index 00000000000..8d55c1e540a
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourceFactory.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage$Literals.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage$Literals.class
new file mode 100644
index 00000000000..9e69f993663
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage$Literals.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage.class
new file mode 100644
index 00000000000..b2bfe7694c1
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/ResourcePackage.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.class
new file mode 100644
index 00000000000..00d91e195c5
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.class
new file mode 100644
index 00000000000..86445765953
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceImpl.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceImpl.class
new file mode 100644
index 00000000000..863d19b9e71
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourceImpl.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.class
new file mode 100644
index 00000000000..104c1fc0295
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory$1.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory$1.class
new file mode 100644
index 00000000000..374e1b11f62
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory$1.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.class
new file mode 100644
index 00000000000..da9fe66b94a
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceSwitch.class b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceSwitch.class
new file mode 100644
index 00000000000..cb2abf9df4e
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/bin/org/eclipse/papyrus/resource/util/ResourceSwitch.class
Binary files differ
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/build.properties b/plugins/profile-tool/org.eclipse.papyrus.resource/build.properties
new file mode 100644
index 00000000000..94eca5f181f
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/build.properties
@@ -0,0 +1,21 @@
+#/*****************************************************************************
+# * Copyright (c) 2009 Atos Origin.
+# *
+# *
+# * All rights reserved. This program and the accompanying materials
+# * are made available under the terms of the Eclipse Public License v1.0
+# * which accompanies this distribution, and is available at
+# * http://www.eclipse.org/legal/epl-v10.html
+# *
+# * Contributors:
+# * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+# *
+# *****************************************************************************/
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecore b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecore
new file mode 100644
index 00000000000..570f6882597
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecore
@@ -0,0 +1,12 @@
+<?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="resource"
+ nsURI="http://www.eclipse.org/papyurs/0.7.0/Resource" nsPrefix="resource">
+ <eClassifiers xsi:type="ecore:EClass" name="Resource">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="eobjects" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject" volatile="true"
+ transient="true" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ResourceEObject" eSuperTypes="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+</ecore:EPackage>
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecorediag b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecorediag
new file mode 100644
index 00000000000..568ade511b4
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.ecorediag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_l43mkK5mEd6h2ecTXi7wcw" type="EcoreTools" name="resource.ecorediag" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_l5eDgK5mEd6h2ecTXi7wcw" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_l5eDg65mEd6h2ecTXi7wcw" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_l5eDhK5mEd6h2ecTXi7wcw" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_l5eDha5mEd6h2ecTXi7wcw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l5eDhq5mEd6h2ecTXi7wcw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l5eDh65mEd6h2ecTXi7wcw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_l5eDiK5mEd6h2ecTXi7wcw" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_l5eDia5mEd6h2ecTXi7wcw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l5eDiq5mEd6h2ecTXi7wcw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l5eDi65mEd6h2ecTXi7wcw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_l5eDga5mEd6h2ecTXi7wcw" fontColor="4210752" fontName="Microsoft Sans Serif" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="resource.ecore#//Resource"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l5eDgq5mEd6h2ecTXi7wcw" x="130" y="115"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_A3Rw8K5rEd6xDPdY34V9OQ" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_A3bh8K5rEd6xDPdY34V9OQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_A3bh8a5rEd6xDPdY34V9OQ" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_A3bh8q5rEd6xDPdY34V9OQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_A3bh865rEd6xDPdY34V9OQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_A3bh9K5rEd6xDPdY34V9OQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_A3bh9a5rEd6xDPdY34V9OQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_A3bh9q5rEd6xDPdY34V9OQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_A3bh965rEd6xDPdY34V9OQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_A3bh-K5rEd6xDPdY34V9OQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_A3Rw8a5rEd6xDPdY34V9OQ" fontColor="4210752" fontName="Microsoft Sans Serif" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="resource.ecore#//ResourceEObject"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_A3Rw8q5rEd6xDPdY34V9OQ" x="25" y="365"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_l43mka5mEd6h2ecTXi7wcw"/>
+ <element xmi:type="ecore:EPackage" href="resource.ecore#/"/>
+</notation:Diagram>
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.genmodel b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.genmodel
new file mode 100644
index 00000000000..bd33ffd7dfd
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/model/resource.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" modelDirectory="/org.eclipse.papyrus.resource/src"
+ editorDirectory="" modelPluginID="org.eclipse.papyrus.resource" modelName="Resource"
+ testsDirectory="" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false">
+ <foreignModel>resource.ecore</foreignModel>
+ <genPackages prefix="Resource" basePackage="org.eclipse.papyrus" disposableProviderFactory="true"
+ ecorePackage="resource.ecore#/">
+ <genClasses ecoreClass="resource.ecore#//Resource">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference resource.ecore#//Resource/eobjects"/>
+ </genClasses>
+ <genClasses ecoreClass="resource.ecore#//ResourceEObject"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/plugin.properties b/plugins/profile-tool/org.eclipse.papyrus.resource/plugin.properties
new file mode 100644
index 00000000000..689c24ccbaa
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Resource Model
+providerName = www.example.org
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/plugin.xml b/plugins/profile-tool/org.eclipse.papyrus.resource/plugin.xml
new file mode 100644
index 00000000000..4266258f20b
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/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/papyurs/0.7.0/Resource"
+ class="org.eclipse.papyrus.resource.ResourcePackage"
+ genModel="model/resource.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java
new file mode 100644
index 00000000000..8e4b23c31c1
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Resource</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.resource.Resource#getEobjects <em>Eobjects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.resource.ResourcePackage#getResource()
+ * @model
+ * @generated
+ */
+public interface Resource extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Eobjects</b></em>' containment reference list. The list
+ * contents are of type {@link org.eclipse.emf.ecore.EObject}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Eobjects</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>Eobjects</em>' containment reference list.
+ * @see org.eclipse.papyrus.resource.ResourcePackage#getResource_Eobjects()
+ * @model containment="true" transient="true" volatile="true"
+ * @generated
+ */
+ EList<EObject> getEobjects();
+
+} // Resource
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java
new file mode 100644
index 00000000000..cb3c4629fca
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>EObject</b></em>'. <!--
+ * end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.resource.ResourcePackage#getResourceEObject()
+ * @model
+ * @generated
+ */
+public interface ResourceEObject extends EObject {
+} // ResourceEObject
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java
new file mode 100644
index 00000000000..079855157f7
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource;
+
+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.resource.ResourcePackage
+ * @generated
+ */
+public interface ResourceFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ResourceFactory eINSTANCE = org.eclipse.papyrus.resource.impl.ResourceFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Resource</em>'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return a new object of class '<em>Resource</em>'.
+ * @generated
+ */
+ Resource createResource();
+
+ /**
+ * Returns a new object of class '<em>EObject</em>'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return a new object of class '<em>EObject</em>'.
+ * @generated
+ */
+ ResourceEObject createResourceEObject();
+
+ /**
+ * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ResourcePackage getResourcePackage();
+
+} // ResourceFactory
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java
new file mode 100644
index 00000000000..cb498632396
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource;
+
+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.resource.ResourceFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ResourcePackage extends EPackage {
+
+ /**
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "resource";
+
+ /**
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyurs/0.7.0/Resource";
+
+ /**
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "resource";
+
+ /**
+ * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ResourcePackage eINSTANCE = org.eclipse.papyrus.resource.impl.ResourcePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.resource.impl.ResourceImpl
+ * <em>Resource</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.resource.impl.ResourceImpl
+ * @see org.eclipse.papyrus.resource.impl.ResourcePackageImpl#getResource()
+ * @generated
+ */
+ int RESOURCE = 0;
+
+ /**
+ * The feature id for the '<em><b>Eobjects</b></em>' containment reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE__EOBJECTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Resource</em>' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.resource.impl.ResourceEObjectImpl
+ * <em>EObject</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.resource.impl.ResourceEObjectImpl
+ * @see org.eclipse.papyrus.resource.impl.ResourcePackageImpl#getResourceEObject()
+ * @generated
+ */
+ int RESOURCE_EOBJECT = 1;
+
+ /**
+ * The number of structural features of the '<em>EObject</em>' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_EOBJECT_FEATURE_COUNT = EcorePackage.EOBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.resource.Resource
+ * <em>Resource</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Resource</em>'.
+ * @see org.eclipse.papyrus.resource.Resource
+ * @generated
+ */
+ EClass getResource();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.papyrus.resource.Resource#getEobjects <em>Eobjects</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Eobjects</em>'.
+ * @see org.eclipse.papyrus.resource.Resource#getEobjects()
+ * @see #getResource()
+ * @generated
+ */
+ EReference getResource_Eobjects();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.resource.ResourceEObject
+ * <em>EObject</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>EObject</em>'.
+ * @see org.eclipse.papyrus.resource.ResourceEObject
+ * @generated
+ */
+ EClass getResourceEObject();
+
+ /**
+ * 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
+ */
+ ResourceFactory getResourceFactory();
+
+ /**
+ * <!-- 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.resource.impl.ResourceImpl
+ * <em>Resource</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.resource.impl.ResourceImpl
+ * @see org.eclipse.papyrus.resource.impl.ResourcePackageImpl#getResource()
+ * @generated
+ */
+ EClass RESOURCE = eINSTANCE.getResource();
+
+ /**
+ * The meta object literal for the '<em><b>Eobjects</b></em>' containment reference list
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference RESOURCE__EOBJECTS = eINSTANCE.getResource_Eobjects();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.papyrus.resource.impl.ResourceEObjectImpl <em>EObject</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.resource.impl.ResourceEObjectImpl
+ * @see org.eclipse.papyrus.resource.impl.ResourcePackageImpl#getResourceEObject()
+ * @generated
+ */
+ EClass RESOURCE_EOBJECT = eINSTANCE.getResourceEObject();
+
+ }
+
+} // ResourcePackage
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java
new file mode 100644
index 00000000000..ceeeb778c2a
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.papyrus.resource.ResourceEObject;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>EObject</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ResourceEObjectImpl extends EObjectImpl implements ResourceEObject {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ResourceEObjectImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ResourcePackage.Literals.RESOURCE_EOBJECT;
+ }
+
+} // ResourceEObjectImpl
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java
new file mode 100644
index 00000000000..471ca723c9e
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.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.resource.Resource;
+import org.eclipse.papyrus.resource.ResourceEObject;
+import org.eclipse.papyrus.resource.ResourceFactory;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ResourceFactoryImpl extends EFactoryImpl implements ResourceFactory {
+
+ /**
+ * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ResourceFactory init() {
+ try {
+ ResourceFactory theResourceFactory = (ResourceFactory) EPackage.Registry.INSTANCE
+ .getEFactory("http://www.eclipse.org/papyurs/0.7.0/Resource");
+ if (theResourceFactory != null) {
+ return theResourceFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ResourceFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ResourcePackage.RESOURCE:
+ return createResource();
+ case ResourcePackage.RESOURCE_EOBJECT:
+ return createResourceEObject();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Resource createResource() {
+ ResourceImpl resource = new ResourceImpl();
+ return resource;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceEObject createResourceEObject() {
+ ResourceEObjectImpl resourceEObject = new ResourceEObjectImpl();
+ return resourceEObject;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourcePackage getResourcePackage() {
+ return (ResourcePackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ResourcePackage getPackage() {
+ return ResourcePackage.eINSTANCE;
+ }
+
+} // ResourceFactoryImpl
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java
new file mode 100644
index 00000000000..693defe9e35
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.resource.Resource;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Resource</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.resource.impl.ResourceImpl#getEobjects <em>Eobjects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ResourceImpl extends EObjectImpl implements Resource {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ResourceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ResourcePackage.Literals.RESOURCE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<EObject> getEobjects() {
+ // TODO: implement this method to return the 'Eobjects' containment reference list
+ // Ensure that you remove @generated or mark it @generated NOT
+ // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and
+ // org.eclipse.emf.ecore.EStructuralFeature.Setting
+ // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList
+ // should be used.
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ResourcePackage.RESOURCE__EOBJECTS:
+ return ((InternalEList<?>) getEobjects()).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 ResourcePackage.RESOURCE__EOBJECTS:
+ return getEobjects();
+ }
+ 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 ResourcePackage.RESOURCE__EOBJECTS:
+ getEobjects().clear();
+ getEobjects().addAll((Collection<? extends EObject>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ResourcePackage.RESOURCE__EOBJECTS:
+ getEobjects().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ResourcePackage.RESOURCE__EOBJECTS:
+ return !getEobjects().isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ResourceImpl
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java
new file mode 100644
index 00000000000..eeb24b814ef
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java
@@ -0,0 +1,216 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.impl;
+
+import static org.eclipse.papyrus.resource.ResourcePackage.RESOURCE;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.resource.Resource;
+import org.eclipse.papyrus.resource.ResourceEObject;
+import org.eclipse.papyrus.resource.ResourceFactory;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass resourceEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass resourceEObjectEClass = 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.resource.ResourcePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ResourcePackageImpl() {
+ super(eNS_URI, ResourceFactory.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 ResourcePackage#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 ResourcePackage init() {
+ if (isInited)
+ return (ResourcePackage) EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI);
+
+ // Obtain or create and register package
+ ResourcePackageImpl theResourcePackage = (ResourcePackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcePackageImpl ? EPackage.Registry.INSTANCE
+ .get(eNS_URI)
+ : new ResourcePackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theResourcePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theResourcePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theResourcePackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ResourcePackage.eNS_URI, theResourcePackage);
+ return theResourcePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getResource() {
+ return resourceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getResource_Eobjects() {
+ return (EReference) resourceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getResourceEObject() {
+ return resourceEObjectEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceFactory getResourceFactory() {
+ return (ResourceFactory) 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
+ resourceEClass = createEClass(RESOURCE);
+ createEReference(resourceEClass, RESOURCE__EOBJECTS);
+
+ resourceEObjectEClass = createEClass(RESOURCE_EOBJECT);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This method is guarded to have
+ * no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ resourceEObjectEClass.getESuperTypes().add(ecorePackage.getEObject());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(resourceEClass, Resource.class, "Resource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getResource_Eobjects(), ecorePackage.getEObject(), null, "eobjects", null, 0, -1,
+ Resource.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(resourceEObjectEClass, ResourceEObject.class, "ResourceEObject", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // ResourcePackageImpl
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java
new file mode 100644
index 00000000000..d2b5964b18b
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.resource.Resource;
+import org.eclipse.papyrus.resource.ResourceEObject;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- 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.resource.ResourcePackage
+ * @generated
+ */
+public class ResourceAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ResourcePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ResourcePackage.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 ResourceSwitch<Adapter> modelSwitch = new ResourceSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseResource(Resource object) {
+ return createResourceAdapter();
+ }
+
+ @Override
+ public Adapter caseResourceEObject(ResourceEObject object) {
+ return createResourceEObjectAdapter();
+ }
+
+ @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.resource.Resource
+ * <em>Resource</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.resource.Resource
+ * @generated
+ */
+ public Adapter createResourceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.papyrus.resource.ResourceEObject <em>EObject</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.resource.ResourceEObject
+ * @generated
+ */
+ public Adapter createResourceEObjectAdapter() {
+ 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;
+ }
+
+} // ResourceAdapterFactory
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java
new file mode 100644
index 00000000000..f210037ca76
--- /dev/null
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.resource.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.resource.Resource;
+import org.eclipse.papyrus.resource.ResourceEObject;
+import org.eclipse.papyrus.resource.ResourcePackage;
+
+/**
+ * <!-- 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.resource.ResourcePackage
+ * @generated
+ */
+public class ResourceSwitch<T> {
+
+ /**
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ResourcePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ResourcePackage.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 ResourcePackage.RESOURCE: {
+ Resource resource = (Resource) theEObject;
+ T result = caseResource(resource);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case ResourcePackage.RESOURCE_EOBJECT: {
+ ResourceEObject resourceEObject = (ResourceEObject) theEObject;
+ T result = caseResourceEObject(resourceEObject);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Resource</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>Resource</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseResource(Resource 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. <!-- 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) doSwitch(EObject)
+ * @generated
+ */
+ public T caseResourceEObject(ResourceEObject 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;
+ }
+
+} // ResourceSwitch

Back to the top