Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-07-20 07:26:32 +0000
committercletavernie2011-07-20 07:26:32 +0000
commite219ff9d59a2a0c2ed367e2b282ff09f05720df0 (patch)
treee4eac9e453e15a4cb529fe0a02ac26523c902882
parent27443d0ca327feb04279e826b77ad7c118e99a67 (diff)
downloadorg.eclipse.papyrus-e219ff9d59a2a0c2ed367e2b282ff09f05720df0.tar.gz
org.eclipse.papyrus-e219ff9d59a2a0c2ed367e2b282ff09f05720df0.tar.xz
org.eclipse.papyrus-e219ff9d59a2a0c2ed367e2b282ff09f05720df0.zip
351804: [EMF Embedded Editor] Papyrus shall provide an embedded EMF Editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351804 351803: [New Child] Papyrus shall provide a customizable "New Child" menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=351803 351802: [Constraints] The Property View constraints model should be more generic https://bugs.eclipse.org/bugs/show_bug.cgi?id=351802
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/.project6
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/META-INF/MANIFEST.MF3
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi2
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/about.html28
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/build.properties13
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/custom/constraints.uiCustom55
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/plugin.xml32
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/runtime/DefaultConstraintEngine.java27
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/META-INF/MANIFEST.MF5
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/about.html28
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/build.properties5
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/icons/papyrus.pngbin0 -> 602 bytes
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/plugin.xml38
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/Activator.java28
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxDialog.java308
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxHandler.java21
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java32
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/providers/CustomizableContentProvider.java5
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF3
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/Model/MenuRoot.xmi12
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore19
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi16
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/about.html28
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/build.properties4
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/CustomFiller.java53
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuItem.java2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java27
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java.svntmp46
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildKind.java239
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java21
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewSiblingMenu.java21
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildConfiguration.java46
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildFactory.java109
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildPackage.java991
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/Separator.java21
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/CustomFillerImpl.java (renamed from sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuItemImpl.java)61
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuActionImpl.java230
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuContainerImpl.java156
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuGroupImpl.java275
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuImpl.java307
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java306
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java43
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewSiblingMenuImpl.java43
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildConfigurationImpl.java156
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildFactoryImpl.java251
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildPackageImpl.java551
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/SeparatorImpl.java43
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildAdapterFactory.java305
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceFactoryImpl.java56
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceImpl.java32
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildSwitch.java332
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildXMLProcessor.java54
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/AbstractCustomFillElement.java28
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/CustomFillElement.java17
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java4
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java70
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewSibling.java14
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java32
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/MyCustomFiller.java17
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java15
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java11
61 files changed, 1186 insertions, 4517 deletions
diff --git a/sandbox/org.eclipse.papyrus.constraints/.project b/sandbox/org.eclipse.papyrus.constraints/.project
index 44efa531187..5722ec977ae 100644
--- a/sandbox/org.eclipse.papyrus.constraints/.project
+++ b/sandbox/org.eclipse.papyrus.constraints/.project
@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.gmt.modisco.common.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.gmt.modisco.common.ProjectNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/sandbox/org.eclipse.papyrus.constraints/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.constraints/META-INF/MANIFEST.MF
index d225546815c..aedada5ded3 100644
--- a/sandbox/org.eclipse.papyrus.constraints/META-INF/MANIFEST.MF
+++ b/sandbox/org.eclipse.papyrus.constraints/META-INF/MANIFEST.MF
@@ -21,6 +21,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.log;bundle-version="0.8.0",
org.eclipse.emf.facet.infra.query;bundle-version="0.1.0",
org.eclipse.emf.facet.infra.query.core;bundle-version="0.1.0",
- org.eclipse.emf.facet.infra.common.core;bundle-version="0.1.0"
+ org.eclipse.emf.facet.infra.common.core;bundle-version="0.1.0",
+ org.eclipse.emf.facet.infra.browser.custom.core;bundle-version="0.1.0"
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: dependent
diff --git a/sandbox/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi b/sandbox/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi
index ff03c5260c3..d2a19ecc38d 100644
--- a/sandbox/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi
+++ b/sandbox/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ASCII"?>
-<environment:ConstraintEnvironment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:environment="http://www.eclipse.org/papyrus/constraints/environment" xsi:schemaLocation="http://www.eclipse.org/papyrus/constraints/environment Constraints.ecore#//environment">
+<environment:ConstraintEnvironment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:environment="http://www.eclipse.org/papyrus/constraints/environment">
<constraintTypes label="EMF Instance Of" constraintClass="org.eclipse.papyrus.constraints.constraints.EMFInstanceOfConstraint"/>
<constraintTypes label="True Constraint" constraintClass="org.eclipse.papyrus.constraints.constraints.TrueConstraint"/>
<constraintTypes label="EMF Query" constraintClass="org.eclipse.papyrus.constraints.constraints.EMFQueryConstraint"/>
diff --git a/sandbox/org.eclipse.papyrus.constraints/about.html b/sandbox/org.eclipse.papyrus.constraints/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.constraints/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/sandbox/org.eclipse.papyrus.constraints/build.properties b/sandbox/org.eclipse.papyrus.constraints/build.properties
index 123d0eac8cb..61a963d0412 100644
--- a/sandbox/org.eclipse.papyrus.constraints/build.properties
+++ b/sandbox/org.eclipse.papyrus.constraints/build.properties
@@ -1,14 +1,11 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id$
-
bin.includes = .,\
model/,\
META-INF/,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ about.html,\
+ Model/,\
+ custom/
+output.. = bin/
jars.compile.order = .
source.. = src-gen/
-output.. = bin/
diff --git a/sandbox/org.eclipse.papyrus.constraints/custom/constraints.uiCustom b/sandbox/org.eclipse.papyrus.constraints/custom/constraints.uiCustom
new file mode 100644
index 00000000000..a48db1cfdc1
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.constraints/custom/constraints.uiCustom
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/papyrus/constraints">
+ <types metaclassName="constraints.CompositeConstraint">
+ <references referenceName="constraints">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="constraints.SimpleConstraint">
+ <references referenceName="constraintType">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="properties">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="constraints.ConstraintDescriptor">
+ <references referenceName="display">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="overriddenConstraints">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="constraints.DisplayUnit">
+ <references referenceName="constraints">
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="constraints.environment.ConstraintEnvironment">
+ <references referenceName="constraintTypes">
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="constraints.ReferenceProperty">
+ <references referenceName="value">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+</uicustom:MetamodelView>
diff --git a/sandbox/org.eclipse.papyrus.constraints/plugin.xml b/sandbox/org.eclipse.papyrus.constraints/plugin.xml
index bced4ab83f5..06dba03850a 100644
--- a/sandbox/org.eclipse.papyrus.constraints/plugin.xml
+++ b/sandbox/org.eclipse.papyrus.constraints/plugin.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse version="3.0"?>
-<!--
- <copyright>
- </copyright>
-
- $Id$
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
-->
-
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://www.eclipse.org/papyrus/constraints"
- class="org.eclipse.papyrus.constraints.ConstraintsPackage"
- genModel="Model/Constraints.genmodel"/>
+ <package class="org.eclipse.papyrus.constraints.ConstraintsPackage" genModel="Model/Constraints.genmodel" uri="http://www.eclipse.org/papyrus/constraints"/>
</extension>
<extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://www.eclipse.org/papyrus/constraints/environment"
- class="org.eclipse.papyrus.constraints.environment.EnvironmentPackage"
- genModel="Model/Constraints.genmodel"/>
+ <package class="org.eclipse.papyrus.constraints.environment.EnvironmentPackage" genModel="Model/Constraints.genmodel" uri="http://www.eclipse.org/papyrus/constraints/environment"/>
</extension>
-
+ <extension
+ point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
+ <browserCustomization
+ file="custom/constraints.uiCustom"
+ loadByDefault="true">
+ </browserCustomization>
+ </extension>
+
</plugin>
diff --git a/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/runtime/DefaultConstraintEngine.java b/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/runtime/DefaultConstraintEngine.java
index c070a2249de..eb2e5efeb3c 100644
--- a/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/runtime/DefaultConstraintEngine.java
+++ b/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/runtime/DefaultConstraintEngine.java
@@ -18,7 +18,6 @@ import java.util.Set;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.constraints.Activator;
import org.eclipse.papyrus.constraints.ConstraintDescriptor;
import org.eclipse.papyrus.constraints.DisplayUnit;
import org.eclipse.papyrus.constraints.constraints.Constraint;
@@ -84,22 +83,22 @@ public abstract class DefaultConstraintEngine<E extends DisplayUnit> implements
}
}
- String logValue;
-
- logValue = "Filtered Constraints : "; //$NON-NLS-1$
- for(Constraint constraint : matchedConstraints) {
- logValue += constraint.getDescriptor().getName() + ", ";
- }
- Activator.log.warn(logValue);
+ // String logValue;
+ //
+ // logValue = "Filtered Constraints : "; //$NON-NLS-1$
+ // for(Constraint constraint : matchedConstraints) {
+ // logValue += constraint.getDescriptor().getName() + ", ";
+ // }
+ // Activator.log.warn(logValue);
resolveConstraintConflicts(matchedConstraints);
- logValue = "Filtered Constraints : "; //$NON-NLS-1$
- for(Constraint constraint : matchedConstraints) {
- logValue += constraint.getDescriptor().getName() + ", ";
- }
-
- Activator.log.warn(logValue);
+ // logValue = "Filtered Constraints : "; //$NON-NLS-1$
+ // for(Constraint constraint : matchedConstraints) {
+ // logValue += constraint.getDescriptor().getName() + ", ";
+ // }
+ //
+ // Activator.log.warn(logValue);
return matchedConstraints;
}
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.emf.embeddededitor/META-INF/MANIFEST.MF
index 8a52fc46fe7..4c1023acaa8 100644
--- a/sandbox/org.eclipse.papyrus.emf.embeddededitor/META-INF/MANIFEST.MF
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: EML Editor (Incubation)
-Bundle-SymbolicName: org.eclipse.papyrus.emf.embeddededitor
+Bundle-SymbolicName: org.eclipse.papyrus.emf.embeddededitor;singleton:=true
Bundle-Version: 0.9.0.qualifier
Bundle-Activator: org.eclipse.papyrus.emf.embeddededitor.Activator
Bundle-Vendor: Eclipse Modeling Project
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.facet.infra.browser;bundle-version="0.1.0",
org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.1.0",
org.eclipse.papyrus.log;bundle-version="0.8.0",
- org.eclipse.papyrus.newchild;bundle-version="1.0.0"
+ org.eclipse.papyrus.newchild;bundle-version="0.9.0",
+ org.eclipse.papyrus.properties.model;bundle-version="0.9.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.emf.embeddededitor,
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/about.html b/sandbox/org.eclipse.papyrus.emf.embeddededitor/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/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/sandbox/org.eclipse.papyrus.emf.embeddededitor/build.properties b/sandbox/org.eclipse.papyrus.emf.embeddededitor/build.properties
index 41eb6ade2b4..213767a1d03 100644
--- a/sandbox/org.eclipse.papyrus.emf.embeddededitor/build.properties
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/build.properties
@@ -1,4 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ about.html,\
+ plugin.xml,\
+ icons/
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/icons/papyrus.png b/sandbox/org.eclipse.papyrus.emf.embeddededitor/icons/papyrus.png
new file mode 100644
index 00000000000..0f74e27b483
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/icons/papyrus.png
Binary files differ
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/plugin.xml b/sandbox/org.eclipse.papyrus.emf.embeddededitor/plugin.xml
new file mode 100644
index 00000000000..a5ef88f115d
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/plugin.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="Sample Category"
+ id="sample.commands.category">
+ </category>
+ <command
+ name="Sample Command"
+ categoryId="sample.commands.category"
+ id="sample.commands.sampleCommand">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="sample.commands.sampleCommand"
+ class="org.eclipse.papyrus.emf.embeddededitor.SandboxHandler">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="sample.toolbars.sampleToolbar">
+ <command
+ commandId="sample.commands.sampleCommand"
+ icon="icons/papyrus.png"
+ tooltip="Sample Embedded Editor"
+ id="sample.toolbars.sampleCommand">
+ </command>
+ </toolbar>
+ </menuContribution>
+ </extension>
+</plugin>
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/Activator.java b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/Activator.java
index 5c0a24180c3..2046582414c 100644
--- a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/Activator.java
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/Activator.java
@@ -4,17 +4,10 @@ import java.util.List;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.facet.infra.browser.custom.MetamodelView;
import org.eclipse.emf.facet.infra.browser.custom.core.CustomizationsCatalog;
import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
-import org.eclipse.papyrus.emf.embeddededitor.editor.EmbeddedEditor;
import org.eclipse.papyrus.log.LogHelper;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -48,27 +41,6 @@ public class Activator extends AbstractUIPlugin {
super.start(context);
plugin = this;
log = new LogHelper(this);
-
- // if(true) {
- // return;
- // }
-
- Shell shell = new Shell(Display.getCurrent());
- shell.setLayout(new FillLayout());
- shell.setSize(400, 300);
-
- try {
- ResourceSet resourceSet = new ResourceSetImpl();
- resourceSet.getResource(URI.createPlatformResourceURI("Test/seq_diagram2.uml", true), true);
-
- EmbeddedEditor editor = new EmbeddedEditor(resourceSet);
- editor.createWidget(shell);
- } catch (Exception ex) {
- log.error(ex);
- }
-
- shell.open();
-
}
/*
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxDialog.java b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxDialog.java
new file mode 100644
index 00000000000..9d3837e1769
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxDialog.java
@@ -0,0 +1,308 @@
+package org.eclipse.papyrus.emf.embeddededitor;
+
+import java.util.EventObject;
+import java.util.Set;
+
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.papyrus.emf.embeddededitor.editor.EmbeddedEditor;
+import org.eclipse.papyrus.properties.contexts.View;
+import org.eclipse.papyrus.properties.runtime.ConfigurationManager;
+import org.eclipse.papyrus.properties.runtime.EmbeddedDisplayEngine;
+import org.eclipse.papyrus.widgets.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+
+public class SandboxDialog extends TrayDialog {
+
+ protected EmbeddedEditor editor;
+
+ private String shellTitle = "Sample Embedded Editor"; //$NON-NLS-1$
+
+ public static String APPLY_LABEL = "Apply";
+
+ public static int APPLY_ID = 50; //Avoid conflicts with IDialogConstants
+
+ protected SandboxDialog(Shell shell) {
+ super(shell);
+ }
+
+ @Override
+ public void create() {
+ super.create();
+
+ SashForm self = new SashForm(getDialogArea(), SWT.NONE);
+ self.setOrientation(SWT.VERTICAL);
+ self.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Composite topPart = new Composite(self, SWT.NONE);
+ topPart.setLayout(new FillLayout());
+
+ SashForm topSash = new SashForm(topPart, SWT.NONE);
+ topSash.setOrientation(SWT.HORIZONTAL);
+ topSash.setSashWidth(3);
+
+ Composite bottomPart = new Composite(self, SWT.NONE);
+ bottomPart.setLayout(new GridLayout(1, true));
+
+ createSelectionPart(topSash);
+ createEditorPart(topSash);
+ createPropertiesPart(bottomPart);
+
+ getShell().setImage(Activator.getDefault().getImage("icons/papyrus.png")); //$NON-NLS-1$
+ getShell().setText(shellTitle);
+
+ self.setWeights(new int[]{ 30, 20 });
+ topSash.setWeights(new int[]{ 20, 60 });
+
+ getShell().setSize(750, 500);
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ //The OK button still has the initial focus, but does not
+ //automatically get it back when another non-button widget is selected
+ //(default = false)
+ //This will prevent the dialog to close when a text-widget is
+ //validated with the "Enter" key
+ getShell().setDefaultButton(null);
+ getButton(IDialogConstants.OK_ID).setFocus();
+
+ Button apply = createButton(parent, APPLY_ID, APPLY_LABEL, false);
+ apply.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ editor.save();
+ updateTitle();
+ }
+ });
+ }
+
+ protected void updateTitle() {
+ if(editor.isSaveNeeded()) {
+ getShell().setText(shellTitle + "*"); //$NON-NLS-1$
+ } else {
+ getShell().setText(shellTitle);
+ }
+ }
+
+ @Override
+ protected int getShellStyle() {
+ int style = super.getShellStyle();
+ return style;
+ }
+
+ private void createSelectionPart(Composite topPart) {
+ Tree tree = new Tree(topPart, SWT.MULTI | SWT.BORDER);
+ TreeItem item = new TreeItem(tree, SWT.NONE);
+ {
+ TreeItem subItem = new TreeItem(item, SWT.NONE);
+ subItem.setText("subItem");
+ TreeItem subItem2 = new TreeItem(item, SWT.NONE);
+ {
+ TreeItem subItem3 = new TreeItem(subItem2, SWT.NONE);
+ subItem3.setText("subItem3");
+ }
+ subItem2.setText("subItem2");
+ }
+ item.setText("item");
+ TreeItem item2 = new TreeItem(tree, SWT.NONE);
+ {
+ TreeItem subItem = new TreeItem(item2, SWT.NONE);
+ subItem.setText("subItem");
+ TreeItem subItem2 = new TreeItem(item2, SWT.NONE);
+ subItem2.setText("subItem2");
+ }
+ item2.setText("item2");
+ TreeItem item3 = new TreeItem(tree, SWT.NONE);
+ item3.setText("item3");
+
+ GridData data = new GridData(SWT.FILL, SWT.FILL, false, true);
+ data.widthHint = 100;
+ tree.setLayoutData(data);
+ }
+
+ private void createButtons(Composite topPart) {
+ Composite buttonsPart = new Composite(topPart, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, false, true);
+ buttonsPart.setLayoutData(data);
+ buttonsPart.setLayout(new GridLayout());
+
+ Button right = new Button(buttonsPart, SWT.PUSH);
+ right.setImage(Activator.getDefault().getImage("org.eclipse.papyrus.widgets", "/icons/arrow_right.gif"));
+
+ Button left = new Button(buttonsPart, SWT.PUSH);
+ left.setImage(Activator.getDefault().getImage("org.eclipse.papyrus.widgets", "/icons/arrow_left.gif"));
+ }
+
+ private void createEditorPart(Composite topPart) {
+ try {
+ Composite editorAndButtonsPart = new Composite(topPart, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.horizontalSpacing = 2;
+ editorAndButtonsPart.setLayout(layout);
+ editorAndButtonsPart.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ createButtons(editorAndButtonsPart);
+
+ Composite editorPart = new Composite(editorAndButtonsPart, SWT.BORDER);
+ FillLayout fillLayout = new FillLayout();
+ fillLayout.marginWidth = 0;
+ editorPart.setLayout(fillLayout);
+ editorPart.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ resourceSet.getResource(URI.createPlatformResourceURI("/Test/NewChildConfig/NewchildConfig.xmi", true), true);
+
+ editor = new EmbeddedEditor(resourceSet);
+ editor.createWidget(editorPart);
+
+ editor.addCommandStackListener(new CommandStackListener() {
+
+ public void commandStackChanged(EventObject event) {
+ updateTitle();
+ }
+
+ });
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ private void createPropertiesPart(Composite bottomPart) {
+ final ScrolledComposite scrolled = new ScrolledComposite(bottomPart, SWT.NONE | SWT.H_SCROLL | SWT.V_SCROLL);
+ scrolled.getVerticalBar().setIncrement(8);
+ scrolled.setBackground(scrolled.getDisplay().getSystemColor(SWT.COLOR_WHITE));
+ scrolled.setBackgroundMode(SWT.INHERIT_DEFAULT);
+
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.heightHint = 120;
+ scrolled.setLayoutData(data);
+
+ final Composite properties = new Composite(scrolled, SWT.NONE);
+ final EmbeddedDisplayEngine displayEngine = new EmbeddedDisplayEngine();
+ properties.setLayout(new FillLayout());
+
+ data = new GridData(SWT.FILL, SWT.FILL, true, false);
+ data.heightHint = 120;
+ properties.setLayoutData(data);
+
+ scrolled.setContent(properties);
+
+ editor.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ Set<View> views = ConfigurationManager.instance.constraintEngine.getViews(selection);
+ displayEngine.display(views, properties, selection, SWT.TOP);
+ refreshDisplay(properties, scrolled);
+ }
+
+ });
+
+ scrolled.addControlListener(new ControlListener() {
+
+ public void controlMoved(ControlEvent e) {
+ //Nothing
+ }
+
+ public void controlResized(ControlEvent e) {
+ refreshDisplay(properties, scrolled);
+ }
+
+ });
+ }
+
+ private void refreshDisplay(Composite properties, Composite scrolled) {
+ Point size = properties.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ if(scrolled.getSize().x > 0) {
+ size.x = scrolled.getSize().x - 21;
+ }
+ properties.setSize(size);
+ properties.layout();
+ // scrolled.layout();
+ }
+
+ @Override
+ protected void okPressed() {
+ editor.save();
+ super.okPressed();
+ }
+
+ @Override
+ protected void cancelPressed() {
+ handleShellCloseEvent();
+ }
+
+ @Override
+ protected void handleShellCloseEvent() {
+ if(editor.isSaveNeeded()) {
+ MessageDialog dialog = new MessageDialog(getShell(), "Cancel ?", null, "Unsaved changes", MessageDialog.WARNING, new String[]{ "Save", "Don't save", "Cancel" }, 2);
+ dialog.open();
+ switch(dialog.getReturnCode()) {
+ case 0: //Save & quit
+ editor.save();
+ //No break
+ case 1: //Quit
+ super.handleShellCloseEvent();
+ break;
+ case 2:
+ return;
+ }
+ } else {
+ super.handleShellCloseEvent();
+ }
+ }
+
+ @Override
+ protected Composite getDialogArea() {
+ return (Composite)super.getDialogArea();
+ }
+
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ @Override
+ protected Composite createDialogArea(Composite parent) {
+ Composite control = (Composite)super.createDialogArea(parent);
+ // control.setBackgroundMode(SWT.INHERIT_DEFAULT);
+ // control.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_WHITE));
+
+ return control;
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
+ shell.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_WHITE));
+ }
+}
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxHandler.java b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxHandler.java
new file mode 100644
index 00000000000..ac34c4159ba
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxHandler.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.emf.embeddededitor;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+
+public class SandboxHandler extends AbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ Shell shell = window.getShell();
+
+ (new SandboxDialog(shell)).open();
+
+ return null;
+ }
+}
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java
index 7d3bcc5a45c..71669245218 100644
--- a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java
@@ -25,7 +25,10 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
@@ -47,6 +50,7 @@ import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.papyrus.emf.embeddededitor.Activator;
import org.eclipse.papyrus.emf.embeddededitor.providers.CustomizableContentProvider;
import org.eclipse.papyrus.emf.embeddededitor.providers.EditingDomainProviderAdapter;
+import org.eclipse.papyrus.newchild.util.EMFHelper;
import org.eclipse.papyrus.properties.widgets.layout.GridData;
import org.eclipse.papyrus.properties.widgets.layout.PropertiesLayout;
import org.eclipse.papyrus.widgets.editors.AbstractEditor;
@@ -136,7 +140,7 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
});
- Tree tree = new Tree(container, SWT.BORDER | SWT.MULTI);
+ Tree tree = new Tree(container, SWT.NONE | SWT.MULTI);
tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
treeViewer = new TreeViewer(tree);
@@ -230,9 +234,21 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
return;
}
+ IEditingDomainProvider domainProvider = (IEditingDomainProvider)EcoreUtil.getAdapter(resourceSet.eAdapters(), IEditingDomainProvider.class);
+ if(domainProvider == null) {
+ return;
+ }
+
+ EditingDomain domain = domainProvider.getEditingDomain();
+ if(domain == null) {
+ return;
+ }
+
for(Resource resource : resourceSet.getResources()) {
try {
- resource.save(Collections.EMPTY_MAP);
+ if(!EMFHelper.isReadOnly(resource, domain)) {
+ resource.save(Collections.EMPTY_MAP);
+ }
} catch (IOException ex) {
Activator.log.error(ex);
}
@@ -241,6 +257,10 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
}
+ public boolean isSaveNeeded() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
public void saveAs(URI saveAsURI) {
//TODO
}
@@ -252,4 +272,12 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
public void menuAboutToShow(IMenuManager menuManager) {
actionBarContributor.menuAboutToShow(menuManager);
}
+
+ public TreeViewer getViewer() {
+ return treeViewer;
+ }
+
+ public void addCommandStackListener(CommandStackListener listener) {
+ editingDomain.getCommandStack().addCommandStackListener(listener);
+ }
}
diff --git a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/providers/CustomizableContentProvider.java b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/providers/CustomizableContentProvider.java
index cfea99fe349..60addea0250 100644
--- a/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/providers/CustomizableContentProvider.java
+++ b/sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/providers/CustomizableContentProvider.java
@@ -25,4 +25,9 @@ public class CustomizableContentProvider extends CustomizableModelContentProvide
return new Object[0];
}
+ @Override
+ public boolean hasChildren(Object parentElement) {
+ return getChildren(parentElement).length > 0;
+ }
+
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
index bac749f603f..6bd9c5fef7a 100644
--- a/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
+++ b/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
@@ -2,7 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.papyrus.newchild;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.newchild.Activator
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/sandbox/org.eclipse.papyrus.newchild/Model/MenuRoot.xmi b/sandbox/org.eclipse.papyrus.newchild/Model/MenuRoot.xmi
deleted file mode 100644
index 8a9be26ee04..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/Model/MenuRoot.xmi
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<newchild:MenuRoot xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints" xmlns:newchild="http://www.eclipse.org/papyrus/newchild" xsi:schemaLocation="http://www.eclipse.org/papyrus/constraints ../../org.eclipse.papyrus.constraints/Model/Constraints.ecore http://www.eclipse.org/papyrus/newchild NewChild.ecore" elementMultiplicity="1">
- <constraints xsi:type="constraints:SimpleConstraint" name="">
- <constraintType href="../../org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="EObject"/>
- </constraints>
- <groups before="" after="">
- <submenus xsi:type="newchild:NewChildMenu" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif"/>
- <submenus xsi:type="newchild:NewSiblingMenu" name="New sibling" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif"/>
- </groups>
-</newchild:MenuRoot>
diff --git a/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore b/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
index db50c389d77..48441fd8143 100644
--- a/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
+++ b/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
@@ -6,10 +6,12 @@
<eClassifiers xsi:type="ecore:EClass" name="NewchildConfiguration">
<eStructuralFeatures xsi:type="ecore:EReference" name="roots" upperBound="-1"
eType="#//MenuRoot" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MenuRoot" eSuperTypes="#//MenuContainer ../../org.eclipse.papyrus.constraints/Model/Constraints.ecore#//DisplayUnit">
<eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1"
eType="#//MenuGroup" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MenuItem" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
@@ -32,8 +34,12 @@
<eLiterals name="child"/>
<eLiterals name="sibling" value="1"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="NewChildMenu" eSuperTypes="#//Menu"/>
- <eClassifiers xsi:type="ecore:EClass" name="NewSiblingMenu" eSuperTypes="#//Menu"/>
+ <eClassifiers xsi:type="ecore:EClass" name="NewChildMenu" eSuperTypes="#//Menu">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="position" lowerBound="1"
+ eType="#//ElementPosition" defaultValueLiteral="child"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="#//NewChildKind"
+ defaultValueLiteral="hierarchical"/>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Separator" eSuperTypes="#//MenuItem"/>
<eClassifiers xsi:type="ecore:EClass" name="MenuGroup" eSuperTypes="#//MenuContainer">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="before" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
@@ -45,4 +51,13 @@
<eLiterals name="top"/>
<eLiterals name="bottom" value="1"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="NewChildKind">
+ <eLiterals name="hierarchical"/>
+ <eLiterals name="flat" value="1"/>
+ <eLiterals name="auto" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CustomFiller" eSuperTypes="#//MenuItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" lowerBound="1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi b/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
index 8ee2ec0ca2b..010acdc5626 100644
--- a/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
+++ b/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
@@ -1,24 +1,20 @@
<?xml version="1.0" encoding="ASCII"?>
-<newchild:NewchildConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints" xmlns:newchild="http://www.eclipse.org/papyrus/newchild" xsi:schemaLocation="http://www.eclipse.org/papyrus/constraints ../../org.eclipse.papyrus.constraints/Model/Constraints.ecore http://www.eclipse.org/papyrus/newchild NewChild.ecore">
+<newchild:NewchildConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints" xmlns:newchild="http://www.eclipse.org/papyrus/newchild">
<roots elementMultiplicity="1">
<constraints xsi:type="constraints:SimpleConstraint" name="isEObject">
- <constraintType href="../../org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <constraintType href="platform:/plugin/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="EObject"/>
</constraints>
<groups>
- <submenus xsi:type="newchild:NewChildMenu" id="newChild" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif"/>
- <submenus xsi:type="newchild:NewSiblingMenu" id="newSibling" name="New sibling" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif"/>
+ <submenus xsi:type="newchild:NewChildMenu" id="newChild" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif" kind="auto"/>
+ <submenus xsi:type="newchild:NewChildMenu" id="newSibling" name="New sibling" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif" position="sibling" kind="auto"/>
+ <submenus xsi:type="newchild:CustomFiller" id="" className="org.eclipse.papyrus.newchild.menu.MyCustomFiller"/>
</groups>
</roots>
<roots elementMultiplicity="1">
- <constraints xsi:type="constraints:SimpleConstraint" name="isUMLClass">
- <constraintType href="../../org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/uml2/3.0.0/UML"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="Class"/>
- </constraints>
<groups>
- <submenus xsi:type="newchild:NewChildMenu" id="newChild" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif"/>
+ <submenus xsi:type="newchild:NewChildMenu" id="newChild" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif" kind="auto"/>
</groups>
</roots>
</newchild:NewchildConfiguration>
diff --git a/sandbox/org.eclipse.papyrus.newchild/about.html b/sandbox/org.eclipse.papyrus.newchild/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/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/sandbox/org.eclipse.papyrus.newchild/build.properties b/sandbox/org.eclipse.papyrus.newchild/build.properties
index 123d0eac8cb..79d799f9825 100644
--- a/sandbox/org.eclipse.papyrus.newchild/build.properties
+++ b/sandbox/org.eclipse.papyrus.newchild/build.properties
@@ -8,7 +8,9 @@ bin.includes = .,\
model/,\
META-INF/,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ Model/,\
+ about.html
jars.compile.order = .
source.. = src-gen/
output.. = bin/
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/CustomFiller.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/CustomFiller.java
new file mode 100644
index 00000000000..d7874f7e66b
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/CustomFiller.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Custom Filler</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.CustomFiller#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getCustomFiller()
+ * @model
+ * @generated
+ */
+public interface CustomFiller extends MenuItem {
+ /**
+ * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Class 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>Class Name</em>' attribute.
+ * @see #setClassName(String)
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getCustomFiller_ClassName()
+ * @model required="true"
+ * @generated
+ */
+ String getClassName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.CustomFiller#getClassName <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Class Name</em>' attribute.
+ * @see #getClassName()
+ * @generated
+ */
+ void setClassName(String value);
+
+} // CustomFiller
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuItem.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuItem.java
index c712f80c858..4476eec4144 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuItem.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuItem.java
@@ -25,7 +25,6 @@ import org.eclipse.emf.ecore.EObject;
* @generated
*/
public interface MenuItem extends EObject {
-
/**
* Returns the value of the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
@@ -51,4 +50,5 @@ public interface MenuItem extends EObject {
* @generated
*/
void setId(String value);
+
} // MenuItem
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java
index af76c924a1e..617e5f07613 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java
@@ -19,6 +19,7 @@ import org.eclipse.papyrus.constraints.DisplayUnit;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.papyrus.newchild.MenuRoot#getGroups <em>Groups</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.MenuRoot#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -43,4 +44,30 @@ public interface MenuRoot extends MenuContainer, DisplayUnit {
* @generated
*/
EList<MenuGroup> getGroups();
+
+ /**
+ * 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.newchild.NewchildPackage#getMenuRoot_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.MenuRoot#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);
} // MenuRoot
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java.svntmp b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java.svntmp
new file mode 100644
index 00000000000..c2b056e4abc
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java.svntmp
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.constraints.DisplayUnit;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Menu Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.MenuRoot#getGroups <em>Groups</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getMenuRoot()
+ * @model
+ * @generated
+ */
+public interface MenuRoot extends MenuContainer, DisplayUnit {
+ /**
+ * Returns the value of the '<em><b>Groups</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.newchild.MenuGroup}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Groups</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>Groups</em>' containment reference list.
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getMenuRoot_Groups()
+ * @model containment="true"
+ * @generated
+ */
+ EList<MenuGroup> getGroups();
+
+} // MenuRoot
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildKind.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildKind.java
new file mode 100644
index 00000000000..ce09dc91446
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildKind.java
@@ -0,0 +1,239 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>New Child Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildKind()
+ * @model
+ * @generated
+ */
+public enum NewChildKind implements Enumerator {
+ /**
+ * The '<em><b>Hierarchical</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #HIERARCHICAL_VALUE
+ * @generated
+ * @ordered
+ */
+ HIERARCHICAL(0, "hierarchical", "hierarchical"),
+
+ /**
+ * The '<em><b>Flat</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #FLAT_VALUE
+ * @generated
+ * @ordered
+ */
+ FLAT(1, "flat", "flat"),
+
+ /**
+ * The '<em><b>Auto</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #AUTO_VALUE
+ * @generated
+ * @ordered
+ */
+ AUTO(2, "auto", "auto");
+
+ /**
+ * The '<em><b>Hierarchical</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Hierarchical</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #HIERARCHICAL
+ * @model name="hierarchical"
+ * @generated
+ * @ordered
+ */
+ public static final int HIERARCHICAL_VALUE = 0;
+
+ /**
+ * The '<em><b>Flat</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Flat</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #FLAT
+ * @model name="flat"
+ * @generated
+ * @ordered
+ */
+ public static final int FLAT_VALUE = 1;
+
+ /**
+ * The '<em><b>Auto</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Auto</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #AUTO
+ * @model name="auto"
+ * @generated
+ * @ordered
+ */
+ public static final int AUTO_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>New Child Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final NewChildKind[] VALUES_ARRAY =
+ new NewChildKind[] {
+ HIERARCHICAL,
+ FLAT,
+ AUTO,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>New Child Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<NewChildKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>New Child Kind</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NewChildKind get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ NewChildKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>New Child Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NewChildKind getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ NewChildKind result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>New Child Kind</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NewChildKind get(int value) {
+ switch (value) {
+ case HIERARCHICAL_VALUE: return HIERARCHICAL;
+ case FLAT_VALUE: return FLAT;
+ case AUTO_VALUE: return AUTO;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private NewChildKind(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //NewChildKind
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java
deleted file mode 100644
index c807af17865..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>New Child Menu</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildMenu()
- * @model
- * @generated
- */
-public interface NewChildMenu extends Menu {
-} // NewChildMenu
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewSiblingMenu.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewSiblingMenu.java
deleted file mode 100644
index f06d133506c..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewSiblingMenu.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>New Sibling Menu</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewSiblingMenu()
- * @model
- * @generated
- */
-public interface NewSiblingMenu extends Menu {
-} // NewSiblingMenu
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildConfiguration.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildConfiguration.java
deleted file mode 100644
index 21e866bfb22..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildConfiguration.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Configuration</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getRoots <em>Roots</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewchildConfiguration()
- * @model
- * @generated
- */
-public interface NewchildConfiguration extends EObject {
- /**
- * Returns the value of the '<em><b>Roots</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.newchild.MenuRoot}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Roots</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>Roots</em>' containment reference list.
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewchildConfiguration_Roots()
- * @model containment="true"
- * @generated
- */
- EList<MenuRoot> getRoots();
-
-} // NewchildConfiguration
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildFactory.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildFactory.java
deleted file mode 100644
index 06f0c73ed51..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-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.newchild.NewchildPackage
- * @generated
- */
-public interface NewchildFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- NewchildFactory eINSTANCE = org.eclipse.papyrus.newchild.impl.NewchildFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Configuration</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Configuration</em>'.
- * @generated
- */
- NewchildConfiguration createNewchildConfiguration();
-
- /**
- * Returns a new object of class '<em>Menu Root</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Menu Root</em>'.
- * @generated
- */
- MenuRoot createMenuRoot();
-
- /**
- * Returns a new object of class '<em>Menu</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Menu</em>'.
- * @generated
- */
- Menu createMenu();
-
- /**
- * Returns a new object of class '<em>Menu Action</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Menu Action</em>'.
- * @generated
- */
- MenuAction createMenuAction();
-
- /**
- * Returns a new object of class '<em>New Child Menu</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>New Child Menu</em>'.
- * @generated
- */
- NewChildMenu createNewChildMenu();
-
- /**
- * Returns a new object of class '<em>New Sibling Menu</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>New Sibling Menu</em>'.
- * @generated
- */
- NewSiblingMenu createNewSiblingMenu();
-
- /**
- * Returns a new object of class '<em>Separator</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Separator</em>'.
- * @generated
- */
- Separator createSeparator();
-
- /**
- * Returns a new object of class '<em>Menu Group</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Menu Group</em>'.
- * @generated
- */
- MenuGroup createMenuGroup();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- NewchildPackage getNewchildPackage();
-
-} //NewchildFactory
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildPackage.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildPackage.java
deleted file mode 100644
index 5389590b4ec..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildPackage.java
+++ /dev/null
@@ -1,991 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.NewchildFactory
- * @model kind="package"
- * @generated
- */
-public interface NewchildPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "newchild";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/papyrus/newchild";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "newchild";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- NewchildPackage eINSTANCE = org.eclipse.papyrus.newchild.impl.NewchildPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl <em>Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewchildConfiguration()
- * @generated
- */
- int NEWCHILD_CONFIGURATION = 0;
-
- /**
- * The feature id for the '<em><b>Roots</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEWCHILD_CONFIGURATION__ROOTS = 0;
-
- /**
- * The number of structural features of the '<em>Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEWCHILD_CONFIGURATION_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuContainerImpl <em>Menu Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuContainerImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuContainer()
- * @generated
- */
- int MENU_CONTAINER = 3;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_CONTAINER__SUBMENUS = 0;
-
- /**
- * The number of structural features of the '<em>Menu Container</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_CONTAINER_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl <em>Menu Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuRootImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuRoot()
- * @generated
- */
- int MENU_ROOT = 1;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ROOT__SUBMENUS = MENU_CONTAINER__SUBMENUS;
-
- /**
- * The feature id for the '<em><b>Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ROOT__CONSTRAINTS = MENU_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Element Multiplicity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ROOT__ELEMENT_MULTIPLICITY = MENU_CONTAINER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Groups</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ROOT__GROUPS = MENU_CONTAINER_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Menu Root</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ROOT_FEATURE_COUNT = MENU_CONTAINER_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuItemImpl <em>Menu Item</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuItemImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuItem()
- * @generated
- */
- int MENU_ITEM = 2;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ITEM__ID = 0;
-
- /**
- * The number of structural features of the '<em>Menu Item</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ITEM_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuImpl <em>Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenu()
- * @generated
- */
- int MENU = 4;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU__SUBMENUS = MENU_CONTAINER__SUBMENUS;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU__ID = MENU_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU__NAME = MENU_CONTAINER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Icon</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU__ICON = MENU_CONTAINER_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Menu</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_FEATURE_COUNT = MENU_CONTAINER_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuActionImpl <em>Menu Action</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuActionImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuAction()
- * @generated
- */
- int MENU_ACTION = 5;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ACTION__ID = MENU_ITEM__ID;
-
- /**
- * The feature id for the '<em><b>Element Type</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ACTION__ELEMENT_TYPE = MENU_ITEM_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Position</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ACTION__POSITION = MENU_ITEM_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Menu Action</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_ACTION_FEATURE_COUNT = MENU_ITEM_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.NewChildMenuImpl <em>New Child Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewChildMenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewChildMenu()
- * @generated
- */
- int NEW_CHILD_MENU = 6;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__SUBMENUS = MENU__SUBMENUS;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__ID = MENU__ID;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__NAME = MENU__NAME;
-
- /**
- * The feature id for the '<em><b>Icon</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__ICON = MENU__ICON;
-
- /**
- * The number of structural features of the '<em>New Child Menu</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU_FEATURE_COUNT = MENU_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.NewSiblingMenuImpl <em>New Sibling Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewSiblingMenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewSiblingMenu()
- * @generated
- */
- int NEW_SIBLING_MENU = 7;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_SIBLING_MENU__SUBMENUS = MENU__SUBMENUS;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_SIBLING_MENU__ID = MENU__ID;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_SIBLING_MENU__NAME = MENU__NAME;
-
- /**
- * The feature id for the '<em><b>Icon</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_SIBLING_MENU__ICON = MENU__ICON;
-
- /**
- * The number of structural features of the '<em>New Sibling Menu</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_SIBLING_MENU_FEATURE_COUNT = MENU_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.SeparatorImpl <em>Separator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.SeparatorImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getSeparator()
- * @generated
- */
- int SEPARATOR = 8;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SEPARATOR__ID = MENU_ITEM__ID;
-
- /**
- * The number of structural features of the '<em>Separator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SEPARATOR_FEATURE_COUNT = MENU_ITEM_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuGroupImpl <em>Menu Group</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuGroupImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuGroup()
- * @generated
- */
- int MENU_GROUP = 9;
-
- /**
- * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_GROUP__SUBMENUS = MENU_CONTAINER__SUBMENUS;
-
- /**
- * The feature id for the '<em><b>Before</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_GROUP__BEFORE = MENU_CONTAINER_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>After</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_GROUP__AFTER = MENU_CONTAINER_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Absolute Position</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_GROUP__ABSOLUTE_POSITION = MENU_CONTAINER_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Menu Group</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MENU_GROUP_FEATURE_COUNT = MENU_CONTAINER_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.ElementPosition <em>Element Position</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getElementPosition()
- * @generated
- */
- int ELEMENT_POSITION = 10;
-
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.MenuPosition <em>Menu Position</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.MenuPosition
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuPosition()
- * @generated
- */
- int MENU_POSITION = 11;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.NewchildConfiguration <em>Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Configuration</em>'.
- * @see org.eclipse.papyrus.newchild.NewchildConfiguration
- * @generated
- */
- EClass getNewchildConfiguration();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getRoots <em>Roots</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Roots</em>'.
- * @see org.eclipse.papyrus.newchild.NewchildConfiguration#getRoots()
- * @see #getNewchildConfiguration()
- * @generated
- */
- EReference getNewchildConfiguration_Roots();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuRoot <em>Menu Root</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu Root</em>'.
- * @see org.eclipse.papyrus.newchild.MenuRoot
- * @generated
- */
- EClass getMenuRoot();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.MenuRoot#getGroups <em>Groups</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Groups</em>'.
- * @see org.eclipse.papyrus.newchild.MenuRoot#getGroups()
- * @see #getMenuRoot()
- * @generated
- */
- EReference getMenuRoot_Groups();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuItem <em>Menu Item</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu Item</em>'.
- * @see org.eclipse.papyrus.newchild.MenuItem
- * @generated
- */
- EClass getMenuItem();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.MenuItem#getId <em>Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Id</em>'.
- * @see org.eclipse.papyrus.newchild.MenuItem#getId()
- * @see #getMenuItem()
- * @generated
- */
- EAttribute getMenuItem_Id();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuContainer <em>Menu Container</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu Container</em>'.
- * @see org.eclipse.papyrus.newchild.MenuContainer
- * @generated
- */
- EClass getMenuContainer();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.MenuContainer#getSubmenus <em>Submenus</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Submenus</em>'.
- * @see org.eclipse.papyrus.newchild.MenuContainer#getSubmenus()
- * @see #getMenuContainer()
- * @generated
- */
- EReference getMenuContainer_Submenus();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.Menu <em>Menu</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu</em>'.
- * @see org.eclipse.papyrus.newchild.Menu
- * @generated
- */
- EClass getMenu();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.Menu#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.papyrus.newchild.Menu#getName()
- * @see #getMenu()
- * @generated
- */
- EAttribute getMenu_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.Menu#getIcon <em>Icon</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Icon</em>'.
- * @see org.eclipse.papyrus.newchild.Menu#getIcon()
- * @see #getMenu()
- * @generated
- */
- EAttribute getMenu_Icon();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuAction <em>Menu Action</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu Action</em>'.
- * @see org.eclipse.papyrus.newchild.MenuAction
- * @generated
- */
- EClass getMenuAction();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.newchild.MenuAction#getElementType <em>Element Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Element Type</em>'.
- * @see org.eclipse.papyrus.newchild.MenuAction#getElementType()
- * @see #getMenuAction()
- * @generated
- */
- EReference getMenuAction_ElementType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.MenuAction#getPosition <em>Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Position</em>'.
- * @see org.eclipse.papyrus.newchild.MenuAction#getPosition()
- * @see #getMenuAction()
- * @generated
- */
- EAttribute getMenuAction_Position();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.NewChildMenu <em>New Child Menu</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>New Child Menu</em>'.
- * @see org.eclipse.papyrus.newchild.NewChildMenu
- * @generated
- */
- EClass getNewChildMenu();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.NewSiblingMenu <em>New Sibling Menu</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>New Sibling Menu</em>'.
- * @see org.eclipse.papyrus.newchild.NewSiblingMenu
- * @generated
- */
- EClass getNewSiblingMenu();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.Separator <em>Separator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Separator</em>'.
- * @see org.eclipse.papyrus.newchild.Separator
- * @generated
- */
- EClass getSeparator();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuGroup <em>Menu Group</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Menu Group</em>'.
- * @see org.eclipse.papyrus.newchild.MenuGroup
- * @generated
- */
- EClass getMenuGroup();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.MenuGroup#getBefore <em>Before</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Before</em>'.
- * @see org.eclipse.papyrus.newchild.MenuGroup#getBefore()
- * @see #getMenuGroup()
- * @generated
- */
- EAttribute getMenuGroup_Before();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.MenuGroup#getAfter <em>After</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>After</em>'.
- * @see org.eclipse.papyrus.newchild.MenuGroup#getAfter()
- * @see #getMenuGroup()
- * @generated
- */
- EAttribute getMenuGroup_After();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.MenuGroup#getAbsolutePosition <em>Absolute Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Absolute Position</em>'.
- * @see org.eclipse.papyrus.newchild.MenuGroup#getAbsolutePosition()
- * @see #getMenuGroup()
- * @generated
- */
- EAttribute getMenuGroup_AbsolutePosition();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.papyrus.newchild.ElementPosition <em>Element Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Element Position</em>'.
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @generated
- */
- EEnum getElementPosition();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.papyrus.newchild.MenuPosition <em>Menu Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Menu Position</em>'.
- * @see org.eclipse.papyrus.newchild.MenuPosition
- * @generated
- */
- EEnum getMenuPosition();
-
- /**
- * 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
- */
- NewchildFactory getNewchildFactory();
-
- /**
- * <!-- 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.newchild.impl.NewchildConfigurationImpl <em>Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewchildConfiguration()
- * @generated
- */
- EClass NEWCHILD_CONFIGURATION = eINSTANCE.getNewchildConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Roots</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference NEWCHILD_CONFIGURATION__ROOTS = eINSTANCE.getNewchildConfiguration_Roots();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl <em>Menu Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuRootImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuRoot()
- * @generated
- */
- EClass MENU_ROOT = eINSTANCE.getMenuRoot();
-
- /**
- * The meta object literal for the '<em><b>Groups</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference MENU_ROOT__GROUPS = eINSTANCE.getMenuRoot_Groups();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuItemImpl <em>Menu Item</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuItemImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuItem()
- * @generated
- */
- EClass MENU_ITEM = eINSTANCE.getMenuItem();
-
- /**
- * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU_ITEM__ID = eINSTANCE.getMenuItem_Id();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuContainerImpl <em>Menu Container</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuContainerImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuContainer()
- * @generated
- */
- EClass MENU_CONTAINER = eINSTANCE.getMenuContainer();
-
- /**
- * The meta object literal for the '<em><b>Submenus</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference MENU_CONTAINER__SUBMENUS = eINSTANCE.getMenuContainer_Submenus();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuImpl <em>Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenu()
- * @generated
- */
- EClass MENU = eINSTANCE.getMenu();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU__NAME = eINSTANCE.getMenu_Name();
-
- /**
- * The meta object literal for the '<em><b>Icon</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU__ICON = eINSTANCE.getMenu_Icon();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuActionImpl <em>Menu Action</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuActionImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuAction()
- * @generated
- */
- EClass MENU_ACTION = eINSTANCE.getMenuAction();
-
- /**
- * The meta object literal for the '<em><b>Element Type</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference MENU_ACTION__ELEMENT_TYPE = eINSTANCE.getMenuAction_ElementType();
-
- /**
- * The meta object literal for the '<em><b>Position</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU_ACTION__POSITION = eINSTANCE.getMenuAction_Position();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.NewChildMenuImpl <em>New Child Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewChildMenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewChildMenu()
- * @generated
- */
- EClass NEW_CHILD_MENU = eINSTANCE.getNewChildMenu();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.NewSiblingMenuImpl <em>New Sibling Menu</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.NewSiblingMenuImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewSiblingMenu()
- * @generated
- */
- EClass NEW_SIBLING_MENU = eINSTANCE.getNewSiblingMenu();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.SeparatorImpl <em>Separator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.SeparatorImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getSeparator()
- * @generated
- */
- EClass SEPARATOR = eINSTANCE.getSeparator();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuGroupImpl <em>Menu Group</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.impl.MenuGroupImpl
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuGroup()
- * @generated
- */
- EClass MENU_GROUP = eINSTANCE.getMenuGroup();
-
- /**
- * The meta object literal for the '<em><b>Before</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU_GROUP__BEFORE = eINSTANCE.getMenuGroup_Before();
-
- /**
- * The meta object literal for the '<em><b>After</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU_GROUP__AFTER = eINSTANCE.getMenuGroup_After();
-
- /**
- * The meta object literal for the '<em><b>Absolute Position</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MENU_GROUP__ABSOLUTE_POSITION = eINSTANCE.getMenuGroup_AbsolutePosition();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ElementPosition <em>Element Position</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getElementPosition()
- * @generated
- */
- EEnum ELEMENT_POSITION = eINSTANCE.getElementPosition();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.MenuPosition <em>Menu Position</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.MenuPosition
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuPosition()
- * @generated
- */
- EEnum MENU_POSITION = eINSTANCE.getMenuPosition();
-
- }
-
-} //NewchildPackage
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/Separator.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/Separator.java
deleted file mode 100644
index 16daf1a5c7c..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/Separator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Separator</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getSeparator()
- * @model
- * @generated
- */
-public interface Separator extends MenuItem {
-} // Separator
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuItemImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/CustomFillerImpl.java
index 8f40bdd21d6..3c4775aca7c 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuItemImpl.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/CustomFillerImpl.java
@@ -7,53 +7,54 @@
package org.eclipse.papyrus.newchild.impl;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.papyrus.newchild.MenuItem;
+import org.eclipse.papyrus.newchild.CustomFiller;
import org.eclipse.papyrus.newchild.NewchildPackage;
/**
* <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu Item</b></em>'.
+ * An implementation of the model object '<em><b>Custom Filler</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuItemImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.impl.CustomFillerImpl#getClassName <em>Class Name</em>}</li>
* </ul>
* </p>
*
* @generated
*/
-public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
+public class CustomFillerImpl extends MenuItemImpl implements CustomFiller {
/**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+ * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getId()
+ * @see #getClassName()
* @generated
* @ordered
*/
- protected static final String ID_EDEFAULT = null;
+ protected static final String CLASS_NAME_EDEFAULT = null;
+
/**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+ * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getId()
+ * @see #getClassName()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String className = CLASS_NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected MenuItemImpl() {
+ protected CustomFillerImpl() {
super();
}
@@ -64,7 +65,7 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
*/
@Override
protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU_ITEM;
+ return NewchildPackage.Literals.CUSTOM_FILLER;
}
/**
@@ -72,8 +73,8 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
* <!-- end-user-doc -->
* @generated
*/
- public String getId() {
- return id;
+ public String getClassName() {
+ return className;
}
/**
@@ -81,11 +82,11 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
* <!-- end-user-doc -->
* @generated
*/
- public void setId(String newId) {
- String oldId = id;
- id = newId;
+ public void setClassName(String newClassName) {
+ String oldClassName = className;
+ className = newClassName;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_ITEM__ID, oldId, id));
+ eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.CUSTOM_FILLER__CLASS_NAME, oldClassName, className));
}
/**
@@ -96,8 +97,8 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case NewchildPackage.MENU_ITEM__ID:
- return getId();
+ case NewchildPackage.CUSTOM_FILLER__CLASS_NAME:
+ return getClassName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -110,8 +111,8 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case NewchildPackage.MENU_ITEM__ID:
- setId((String)newValue);
+ case NewchildPackage.CUSTOM_FILLER__CLASS_NAME:
+ setClassName((String)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -125,8 +126,8 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case NewchildPackage.MENU_ITEM__ID:
- setId(ID_EDEFAULT);
+ case NewchildPackage.CUSTOM_FILLER__CLASS_NAME:
+ setClassName(CLASS_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -140,8 +141,8 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case NewchildPackage.MENU_ITEM__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case NewchildPackage.CUSTOM_FILLER__CLASS_NAME:
+ return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
}
return super.eIsSet(featureID);
}
@@ -156,10 +157,10 @@ public abstract class MenuItemImpl extends EObjectImpl implements MenuItem {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (id: ");
- result.append(id);
+ result.append(" (className: ");
+ result.append(className);
result.append(')');
return result.toString();
}
-} //MenuItemImpl
+} //CustomFillerImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuActionImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuActionImpl.java
deleted file mode 100644
index 833a423b34b..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuActionImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.papyrus.extendedtypes.ExtendedElementTypeConfiguration;
-
-import org.eclipse.papyrus.newchild.ElementPosition;
-import org.eclipse.papyrus.newchild.MenuAction;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu Action</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuActionImpl#getElementType <em>Element Type</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuActionImpl#getPosition <em>Position</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class MenuActionImpl extends MenuItemImpl implements MenuAction {
- /**
- * The cached value of the '{@link #getElementType() <em>Element Type</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getElementType()
- * @generated
- * @ordered
- */
- protected ExtendedElementTypeConfiguration elementType;
-
- /**
- * The default value of the '{@link #getPosition() <em>Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPosition()
- * @generated
- * @ordered
- */
- protected static final ElementPosition POSITION_EDEFAULT = ElementPosition.CHILD;
-
- /**
- * The cached value of the '{@link #getPosition() <em>Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPosition()
- * @generated
- * @ordered
- */
- protected ElementPosition position = POSITION_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MenuActionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU_ACTION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ExtendedElementTypeConfiguration getElementType() {
- if (elementType != null && elementType.eIsProxy()) {
- InternalEObject oldElementType = (InternalEObject)elementType;
- elementType = (ExtendedElementTypeConfiguration)eResolveProxy(oldElementType);
- if (elementType != oldElementType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, NewchildPackage.MENU_ACTION__ELEMENT_TYPE, oldElementType, elementType));
- }
- }
- return elementType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ExtendedElementTypeConfiguration basicGetElementType() {
- return elementType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setElementType(ExtendedElementTypeConfiguration newElementType) {
- ExtendedElementTypeConfiguration oldElementType = elementType;
- elementType = newElementType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_ACTION__ELEMENT_TYPE, oldElementType, elementType));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ElementPosition getPosition() {
- return position;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPosition(ElementPosition newPosition) {
- ElementPosition oldPosition = position;
- position = newPosition == null ? POSITION_EDEFAULT : newPosition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_ACTION__POSITION, oldPosition, position));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
- if (resolve) return getElementType();
- return basicGetElementType();
- case NewchildPackage.MENU_ACTION__POSITION:
- return getPosition();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
- setElementType((ExtendedElementTypeConfiguration)newValue);
- return;
- case NewchildPackage.MENU_ACTION__POSITION:
- setPosition((ElementPosition)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
- setElementType((ExtendedElementTypeConfiguration)null);
- return;
- case NewchildPackage.MENU_ACTION__POSITION:
- setPosition(POSITION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
- return elementType != null;
- case NewchildPackage.MENU_ACTION__POSITION:
- return position != POSITION_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (position: ");
- result.append(position);
- result.append(')');
- return result.toString();
- }
-
-} //MenuActionImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuContainerImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuContainerImpl.java
deleted file mode 100644
index f522b62dd9f..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuContainerImpl.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.papyrus.newchild.MenuContainer;
-import org.eclipse.papyrus.newchild.MenuItem;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu Container</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuContainerImpl#getSubmenus <em>Submenus</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public abstract class MenuContainerImpl extends EObjectImpl implements MenuContainer {
- /**
- * The cached value of the '{@link #getSubmenus() <em>Submenus</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSubmenus()
- * @generated
- * @ordered
- */
- protected EList<MenuItem> submenus;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MenuContainerImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU_CONTAINER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<MenuItem> getSubmenus() {
- if (submenus == null) {
- submenus = new EObjectContainmentEList<MenuItem>(MenuItem.class, this, NewchildPackage.MENU_CONTAINER__SUBMENUS);
- }
- return submenus;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case NewchildPackage.MENU_CONTAINER__SUBMENUS:
- return ((InternalEList<?>)getSubmenus()).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 NewchildPackage.MENU_CONTAINER__SUBMENUS:
- return getSubmenus();
- }
- 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 NewchildPackage.MENU_CONTAINER__SUBMENUS:
- getSubmenus().clear();
- getSubmenus().addAll((Collection<? extends MenuItem>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_CONTAINER__SUBMENUS:
- getSubmenus().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_CONTAINER__SUBMENUS:
- return submenus != null && !submenus.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //MenuContainerImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuGroupImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuGroupImpl.java
deleted file mode 100644
index 20d852ca530..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuGroupImpl.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.MenuPosition;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu Group</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuGroupImpl#getBefore <em>Before</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuGroupImpl#getAfter <em>After</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuGroupImpl#getAbsolutePosition <em>Absolute Position</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class MenuGroupImpl extends MenuContainerImpl implements MenuGroup {
- /**
- * The default value of the '{@link #getBefore() <em>Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBefore()
- * @generated
- * @ordered
- */
- protected static final String BEFORE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getBefore() <em>Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBefore()
- * @generated
- * @ordered
- */
- protected String before = BEFORE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAfter() <em>After</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAfter()
- * @generated
- * @ordered
- */
- protected static final String AFTER_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAfter() <em>After</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAfter()
- * @generated
- * @ordered
- */
- protected String after = AFTER_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAbsolutePosition() <em>Absolute Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAbsolutePosition()
- * @generated
- * @ordered
- */
- protected static final MenuPosition ABSOLUTE_POSITION_EDEFAULT = MenuPosition.TOP;
-
- /**
- * The cached value of the '{@link #getAbsolutePosition() <em>Absolute Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAbsolutePosition()
- * @generated
- * @ordered
- */
- protected MenuPosition absolutePosition = ABSOLUTE_POSITION_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MenuGroupImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU_GROUP;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getBefore() {
- return before;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setBefore(String newBefore) {
- String oldBefore = before;
- before = newBefore;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_GROUP__BEFORE, oldBefore, before));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getAfter() {
- return after;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAfter(String newAfter) {
- String oldAfter = after;
- after = newAfter;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_GROUP__AFTER, oldAfter, after));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MenuPosition getAbsolutePosition() {
- return absolutePosition;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAbsolutePosition(MenuPosition newAbsolutePosition) {
- MenuPosition oldAbsolutePosition = absolutePosition;
- absolutePosition = newAbsolutePosition == null ? ABSOLUTE_POSITION_EDEFAULT : newAbsolutePosition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_GROUP__ABSOLUTE_POSITION, oldAbsolutePosition, absolutePosition));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case NewchildPackage.MENU_GROUP__BEFORE:
- return getBefore();
- case NewchildPackage.MENU_GROUP__AFTER:
- return getAfter();
- case NewchildPackage.MENU_GROUP__ABSOLUTE_POSITION:
- return getAbsolutePosition();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case NewchildPackage.MENU_GROUP__BEFORE:
- setBefore((String)newValue);
- return;
- case NewchildPackage.MENU_GROUP__AFTER:
- setAfter((String)newValue);
- return;
- case NewchildPackage.MENU_GROUP__ABSOLUTE_POSITION:
- setAbsolutePosition((MenuPosition)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_GROUP__BEFORE:
- setBefore(BEFORE_EDEFAULT);
- return;
- case NewchildPackage.MENU_GROUP__AFTER:
- setAfter(AFTER_EDEFAULT);
- return;
- case NewchildPackage.MENU_GROUP__ABSOLUTE_POSITION:
- setAbsolutePosition(ABSOLUTE_POSITION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_GROUP__BEFORE:
- return BEFORE_EDEFAULT == null ? before != null : !BEFORE_EDEFAULT.equals(before);
- case NewchildPackage.MENU_GROUP__AFTER:
- return AFTER_EDEFAULT == null ? after != null : !AFTER_EDEFAULT.equals(after);
- case NewchildPackage.MENU_GROUP__ABSOLUTE_POSITION:
- return absolutePosition != ABSOLUTE_POSITION_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (before: ");
- result.append(before);
- result.append(", after: ");
- result.append(after);
- result.append(", absolutePosition: ");
- result.append(absolutePosition);
- result.append(')');
- return result.toString();
- }
-
-} //MenuGroupImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuImpl.java
deleted file mode 100644
index e72d1ef268d..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuImpl.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.papyrus.newchild.Menu;
-import org.eclipse.papyrus.newchild.MenuItem;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuImpl#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuImpl#getIcon <em>Icon</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class MenuImpl extends MenuContainerImpl implements Menu {
- /**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected static final String ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected String id = ID_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;
-
- /**
- * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIcon()
- * @generated
- * @ordered
- */
- protected static final String ICON_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIcon()
- * @generated
- * @ordered
- */
- protected String icon = ICON_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MenuImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getId() {
- return id;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setId(String newId) {
- String oldId = id;
- id = newId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU__ID, oldId, id));
- }
-
- /**
- * <!-- 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, NewchildPackage.MENU__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getIcon() {
- return icon;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setIcon(String newIcon) {
- String oldIcon = icon;
- icon = newIcon;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU__ICON, oldIcon, icon));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case NewchildPackage.MENU__ID:
- return getId();
- case NewchildPackage.MENU__NAME:
- return getName();
- case NewchildPackage.MENU__ICON:
- return getIcon();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case NewchildPackage.MENU__ID:
- setId((String)newValue);
- return;
- case NewchildPackage.MENU__NAME:
- setName((String)newValue);
- return;
- case NewchildPackage.MENU__ICON:
- setIcon((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU__ID:
- setId(ID_EDEFAULT);
- return;
- case NewchildPackage.MENU__NAME:
- setName(NAME_EDEFAULT);
- return;
- case NewchildPackage.MENU__ICON:
- setIcon(ICON_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- case NewchildPackage.MENU__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case NewchildPackage.MENU__ICON:
- return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == MenuItem.class) {
- switch (derivedFeatureID) {
- case NewchildPackage.MENU__ID: return NewchildPackage.MENU_ITEM__ID;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == MenuItem.class) {
- switch (baseFeatureID) {
- case NewchildPackage.MENU_ITEM__ID: return NewchildPackage.MENU__ID;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (id: ");
- result.append(id);
- result.append(", name: ");
- result.append(name);
- result.append(", icon: ");
- result.append(icon);
- result.append(')');
- return result.toString();
- }
-
-} //MenuImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java
deleted file mode 100644
index c0743d884bd..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import java.util.Collection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.papyrus.constraints.ConstraintDescriptor;
-import org.eclipse.papyrus.constraints.ConstraintsPackage;
-import org.eclipse.papyrus.constraints.DisplayUnit;
-import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.MenuRoot;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Menu Root</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl#getConstraints <em>Constraints</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl#getElementMultiplicity <em>Element Multiplicity</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl#getGroups <em>Groups</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class MenuRootImpl extends MenuContainerImpl implements MenuRoot {
- /**
- * The cached value of the '{@link #getConstraints() <em>Constraints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getConstraints()
- * @generated
- * @ordered
- */
- protected EList<ConstraintDescriptor> constraints;
- /**
- * The default value of the '{@link #getElementMultiplicity() <em>Element Multiplicity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getElementMultiplicity()
- * @generated
- * @ordered
- */
- protected static final int ELEMENT_MULTIPLICITY_EDEFAULT = 0;
- /**
- * The cached value of the '{@link #getElementMultiplicity() <em>Element Multiplicity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getElementMultiplicity()
- * @generated
- * @ordered
- */
- protected int elementMultiplicity = ELEMENT_MULTIPLICITY_EDEFAULT;
- /**
- * The cached value of the '{@link #getGroups() <em>Groups</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroups()
- * @generated
- * @ordered
- */
- protected EList<MenuGroup> groups;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MenuRootImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.MENU_ROOT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<ConstraintDescriptor> getConstraints() {
- if (constraints == null) {
- constraints = new EObjectContainmentWithInverseEList<ConstraintDescriptor>(ConstraintDescriptor.class, this, NewchildPackage.MENU_ROOT__CONSTRAINTS, ConstraintsPackage.CONSTRAINT_DESCRIPTOR__DISPLAY);
- }
- return constraints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getElementMultiplicity() {
- return elementMultiplicity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setElementMultiplicity(int newElementMultiplicity) {
- int oldElementMultiplicity = elementMultiplicity;
- elementMultiplicity = newElementMultiplicity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY, oldElementMultiplicity, elementMultiplicity));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<MenuGroup> getGroups() {
- if (groups == null) {
- groups = new EObjectContainmentEList<MenuGroup>(MenuGroup.class, this, NewchildPackage.MENU_ROOT__GROUPS);
- }
- return groups;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case NewchildPackage.MENU_ROOT__CONSTRAINTS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getConstraints()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case NewchildPackage.MENU_ROOT__CONSTRAINTS:
- return ((InternalEList<?>)getConstraints()).basicRemove(otherEnd, msgs);
- case NewchildPackage.MENU_ROOT__GROUPS:
- return ((InternalEList<?>)getGroups()).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 NewchildPackage.MENU_ROOT__CONSTRAINTS:
- return getConstraints();
- case NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY:
- return getElementMultiplicity();
- case NewchildPackage.MENU_ROOT__GROUPS:
- return getGroups();
- }
- 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 NewchildPackage.MENU_ROOT__CONSTRAINTS:
- getConstraints().clear();
- getConstraints().addAll((Collection<? extends ConstraintDescriptor>)newValue);
- return;
- case NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY:
- setElementMultiplicity((Integer)newValue);
- return;
- case NewchildPackage.MENU_ROOT__GROUPS:
- getGroups().clear();
- getGroups().addAll((Collection<? extends MenuGroup>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_ROOT__CONSTRAINTS:
- getConstraints().clear();
- return;
- case NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY:
- setElementMultiplicity(ELEMENT_MULTIPLICITY_EDEFAULT);
- return;
- case NewchildPackage.MENU_ROOT__GROUPS:
- getGroups().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.MENU_ROOT__CONSTRAINTS:
- return constraints != null && !constraints.isEmpty();
- case NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY:
- return elementMultiplicity != ELEMENT_MULTIPLICITY_EDEFAULT;
- case NewchildPackage.MENU_ROOT__GROUPS:
- return groups != null && !groups.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == DisplayUnit.class) {
- switch (derivedFeatureID) {
- case NewchildPackage.MENU_ROOT__CONSTRAINTS: return ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS;
- case NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY: return ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == DisplayUnit.class) {
- switch (baseFeatureID) {
- case ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS: return NewchildPackage.MENU_ROOT__CONSTRAINTS;
- case ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY: return NewchildPackage.MENU_ROOT__ELEMENT_MULTIPLICITY;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (elementMultiplicity: ");
- result.append(elementMultiplicity);
- result.append(')');
- return result.toString();
- }
-
-} //MenuRootImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java
deleted file mode 100644
index 494aaaf03a2..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.papyrus.newchild.NewChildMenu;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>New Child Menu</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class NewChildMenuImpl extends MenuImpl implements NewChildMenu {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NewChildMenuImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.NEW_CHILD_MENU;
- }
-
-} //NewChildMenuImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewSiblingMenuImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewSiblingMenuImpl.java
deleted file mode 100644
index 0f562607f3e..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewSiblingMenuImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.papyrus.newchild.NewSiblingMenu;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>New Sibling Menu</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class NewSiblingMenuImpl extends MenuImpl implements NewSiblingMenu {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NewSiblingMenuImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.NEW_SIBLING_MENU;
- }
-
-} //NewSiblingMenuImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildConfigurationImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildConfigurationImpl.java
deleted file mode 100644
index a2b8d77639b..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildConfigurationImpl.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.papyrus.newchild.MenuRoot;
-import org.eclipse.papyrus.newchild.NewchildConfiguration;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Configuration</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl#getRoots <em>Roots</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class NewchildConfigurationImpl extends EObjectImpl implements NewchildConfiguration {
- /**
- * The cached value of the '{@link #getRoots() <em>Roots</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRoots()
- * @generated
- * @ordered
- */
- protected EList<MenuRoot> roots;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NewchildConfigurationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.NEWCHILD_CONFIGURATION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<MenuRoot> getRoots() {
- if (roots == null) {
- roots = new EObjectContainmentEList<MenuRoot>(MenuRoot.class, this, NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS);
- }
- return roots;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS:
- return ((InternalEList<?>)getRoots()).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 NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS:
- return getRoots();
- }
- 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 NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS:
- getRoots().clear();
- getRoots().addAll((Collection<? extends MenuRoot>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS:
- getRoots().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.NEWCHILD_CONFIGURATION__ROOTS:
- return roots != null && !roots.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //NewchildConfigurationImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildFactoryImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildFactoryImpl.java
deleted file mode 100644
index 281f27dace2..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildFactoryImpl.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.papyrus.newchild.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static NewchildFactory init() {
- try {
- NewchildFactory theNewchildFactory = (NewchildFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/newchild");
- if (theNewchildFactory != null) {
- return theNewchildFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new NewchildFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case NewchildPackage.NEWCHILD_CONFIGURATION: return createNewchildConfiguration();
- case NewchildPackage.MENU_ROOT: return createMenuRoot();
- case NewchildPackage.MENU: return createMenu();
- case NewchildPackage.MENU_ACTION: return createMenuAction();
- case NewchildPackage.NEW_CHILD_MENU: return createNewChildMenu();
- case NewchildPackage.NEW_SIBLING_MENU: return createNewSiblingMenu();
- case NewchildPackage.SEPARATOR: return createSeparator();
- case NewchildPackage.MENU_GROUP: return createMenuGroup();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case NewchildPackage.ELEMENT_POSITION:
- return createElementPositionFromString(eDataType, initialValue);
- case NewchildPackage.MENU_POSITION:
- return createMenuPositionFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case NewchildPackage.ELEMENT_POSITION:
- return convertElementPositionToString(eDataType, instanceValue);
- case NewchildPackage.MENU_POSITION:
- return convertMenuPositionToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildConfiguration createNewchildConfiguration() {
- NewchildConfigurationImpl newchildConfiguration = new NewchildConfigurationImpl();
- return newchildConfiguration;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MenuRoot createMenuRoot() {
- MenuRootImpl menuRoot = new MenuRootImpl();
- return menuRoot;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Menu createMenu() {
- MenuImpl menu = new MenuImpl();
- return menu;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MenuAction createMenuAction() {
- MenuActionImpl menuAction = new MenuActionImpl();
- return menuAction;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewChildMenu createNewChildMenu() {
- NewChildMenuImpl newChildMenu = new NewChildMenuImpl();
- return newChildMenu;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewSiblingMenu createNewSiblingMenu() {
- NewSiblingMenuImpl newSiblingMenu = new NewSiblingMenuImpl();
- return newSiblingMenu;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Separator createSeparator() {
- SeparatorImpl separator = new SeparatorImpl();
- return separator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MenuGroup createMenuGroup() {
- MenuGroupImpl menuGroup = new MenuGroupImpl();
- return menuGroup;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ElementPosition createElementPositionFromString(EDataType eDataType, String initialValue) {
- ElementPosition result = ElementPosition.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertElementPositionToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MenuPosition createMenuPositionFromString(EDataType eDataType, String initialValue) {
- MenuPosition result = MenuPosition.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertMenuPositionToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildPackage getNewchildPackage() {
- return (NewchildPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static NewchildPackage getPackage() {
- return NewchildPackage.eINSTANCE;
- }
-
-} //NewchildFactoryImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildPackageImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildPackageImpl.java
deleted file mode 100644
index f93ff7c02d3..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildPackageImpl.java
+++ /dev/null
@@ -1,551 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.papyrus.constraints.ConstraintsPackage;
-import org.eclipse.papyrus.extendedtypes.ExtendedtypesPackage;
-
-import org.eclipse.papyrus.newchild.ElementPosition;
-import org.eclipse.papyrus.newchild.Menu;
-import org.eclipse.papyrus.newchild.MenuAction;
-import org.eclipse.papyrus.newchild.MenuContainer;
-import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.MenuItem;
-import org.eclipse.papyrus.newchild.MenuPosition;
-import org.eclipse.papyrus.newchild.MenuRoot;
-import org.eclipse.papyrus.newchild.NewChildMenu;
-import org.eclipse.papyrus.newchild.NewSiblingMenu;
-import org.eclipse.papyrus.newchild.NewchildConfiguration;
-import org.eclipse.papyrus.newchild.NewchildFactory;
-import org.eclipse.papyrus.newchild.NewchildPackage;
-import org.eclipse.papyrus.newchild.Separator;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass newchildConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuRootEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuItemEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuContainerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuActionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass newChildMenuEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass newSiblingMenuEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass separatorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass menuGroupEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum elementPositionEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum menuPositionEEnum = 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.newchild.NewchildPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private NewchildPackageImpl() {
- super(eNS_URI, NewchildFactory.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 NewchildPackage#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 NewchildPackage init() {
- if (isInited) return (NewchildPackage)EPackage.Registry.INSTANCE.getEPackage(NewchildPackage.eNS_URI);
-
- // Obtain or create and register package
- NewchildPackageImpl theNewchildPackage = (NewchildPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof NewchildPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new NewchildPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- ConstraintsPackage.eINSTANCE.eClass();
- ExtendedtypesPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theNewchildPackage.createPackageContents();
-
- // Initialize created meta-data
- theNewchildPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theNewchildPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(NewchildPackage.eNS_URI, theNewchildPackage);
- return theNewchildPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getNewchildConfiguration() {
- return newchildConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getNewchildConfiguration_Roots() {
- return (EReference)newchildConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenuRoot() {
- return menuRootEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMenuRoot_Groups() {
- return (EReference)menuRootEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenuItem() {
- return menuItemEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenuItem_Id() {
- return (EAttribute)menuItemEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenuContainer() {
- return menuContainerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMenuContainer_Submenus() {
- return (EReference)menuContainerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenu() {
- return menuEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenu_Name() {
- return (EAttribute)menuEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenu_Icon() {
- return (EAttribute)menuEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenuAction() {
- return menuActionEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMenuAction_ElementType() {
- return (EReference)menuActionEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenuAction_Position() {
- return (EAttribute)menuActionEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getNewChildMenu() {
- return newChildMenuEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getNewSiblingMenu() {
- return newSiblingMenuEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getSeparator() {
- return separatorEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getMenuGroup() {
- return menuGroupEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenuGroup_Before() {
- return (EAttribute)menuGroupEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenuGroup_After() {
- return (EAttribute)menuGroupEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMenuGroup_AbsolutePosition() {
- return (EAttribute)menuGroupEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EEnum getElementPosition() {
- return elementPositionEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EEnum getMenuPosition() {
- return menuPositionEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildFactory getNewchildFactory() {
- return (NewchildFactory)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
- newchildConfigurationEClass = createEClass(NEWCHILD_CONFIGURATION);
- createEReference(newchildConfigurationEClass, NEWCHILD_CONFIGURATION__ROOTS);
-
- menuRootEClass = createEClass(MENU_ROOT);
- createEReference(menuRootEClass, MENU_ROOT__GROUPS);
-
- menuItemEClass = createEClass(MENU_ITEM);
- createEAttribute(menuItemEClass, MENU_ITEM__ID);
-
- menuContainerEClass = createEClass(MENU_CONTAINER);
- createEReference(menuContainerEClass, MENU_CONTAINER__SUBMENUS);
-
- menuEClass = createEClass(MENU);
- createEAttribute(menuEClass, MENU__NAME);
- createEAttribute(menuEClass, MENU__ICON);
-
- menuActionEClass = createEClass(MENU_ACTION);
- createEReference(menuActionEClass, MENU_ACTION__ELEMENT_TYPE);
- createEAttribute(menuActionEClass, MENU_ACTION__POSITION);
-
- newChildMenuEClass = createEClass(NEW_CHILD_MENU);
-
- newSiblingMenuEClass = createEClass(NEW_SIBLING_MENU);
-
- separatorEClass = createEClass(SEPARATOR);
-
- menuGroupEClass = createEClass(MENU_GROUP);
- createEAttribute(menuGroupEClass, MENU_GROUP__BEFORE);
- createEAttribute(menuGroupEClass, MENU_GROUP__AFTER);
- createEAttribute(menuGroupEClass, MENU_GROUP__ABSOLUTE_POSITION);
-
- // Create enums
- elementPositionEEnum = createEEnum(ELEMENT_POSITION);
- menuPositionEEnum = createEEnum(MENU_POSITION);
- }
-
- /**
- * <!-- 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
- ConstraintsPackage theConstraintsPackage = (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- menuRootEClass.getESuperTypes().add(this.getMenuContainer());
- menuRootEClass.getESuperTypes().add(theConstraintsPackage.getDisplayUnit());
- menuEClass.getESuperTypes().add(this.getMenuContainer());
- menuEClass.getESuperTypes().add(this.getMenuItem());
- menuActionEClass.getESuperTypes().add(this.getMenuItem());
- newChildMenuEClass.getESuperTypes().add(this.getMenu());
- newSiblingMenuEClass.getESuperTypes().add(this.getMenu());
- separatorEClass.getESuperTypes().add(this.getMenuItem());
- menuGroupEClass.getESuperTypes().add(this.getMenuContainer());
-
- // Initialize classes and features; add operations and parameters
- initEClass(newchildConfigurationEClass, NewchildConfiguration.class, "NewchildConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getNewchildConfiguration_Roots(), this.getMenuRoot(), null, "roots", null, 0, -1, NewchildConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(menuRootEClass, MenuRoot.class, "MenuRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getMenuRoot_Groups(), this.getMenuGroup(), null, "groups", null, 0, -1, MenuRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(menuItemEClass, MenuItem.class, "MenuItem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMenuItem_Id(), theEcorePackage.getEString(), "id", null, 0, 1, MenuItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(menuContainerEClass, MenuContainer.class, "MenuContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getMenuContainer_Submenus(), this.getMenuItem(), null, "submenus", null, 0, -1, MenuContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(menuEClass, Menu.class, "Menu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMenu_Name(), ecorePackage.getEString(), "name", null, 1, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMenu_Icon(), theEcorePackage.getEString(), "icon", null, 0, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(menuActionEClass, MenuAction.class, "MenuAction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getMenuAction_ElementType(), theExtendedtypesPackage.getExtendedElementTypeConfiguration(), null, "elementType", null, 1, 1, MenuAction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMenuAction_Position(), this.getElementPosition(), "position", "child", 1, 1, MenuAction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(newChildMenuEClass, NewChildMenu.class, "NewChildMenu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(newSiblingMenuEClass, NewSiblingMenu.class, "NewSiblingMenu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(separatorEClass, Separator.class, "Separator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(menuGroupEClass, MenuGroup.class, "MenuGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMenuGroup_Before(), theEcorePackage.getEString(), "before", null, 0, 1, MenuGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMenuGroup_After(), theEcorePackage.getEString(), "after", null, 0, 1, MenuGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMenuGroup_AbsolutePosition(), this.getMenuPosition(), "absolutePosition", "top", 0, 1, MenuGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(elementPositionEEnum, ElementPosition.class, "ElementPosition");
- addEEnumLiteral(elementPositionEEnum, ElementPosition.CHILD);
- addEEnumLiteral(elementPositionEEnum, ElementPosition.SIBLING);
-
- initEEnum(menuPositionEEnum, MenuPosition.class, "MenuPosition");
- addEEnumLiteral(menuPositionEEnum, MenuPosition.TOP);
- addEEnumLiteral(menuPositionEEnum, MenuPosition.BOTTOM);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //NewchildPackageImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/SeparatorImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/SeparatorImpl.java
deleted file mode 100644
index 693a84e7c40..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/SeparatorImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.papyrus.newchild.NewchildPackage;
-import org.eclipse.papyrus.newchild.Separator;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Separator</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class SeparatorImpl extends MenuItemImpl implements Separator {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SeparatorImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NewchildPackage.Literals.SEPARATOR;
- }
-
-} //SeparatorImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildAdapterFactory.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildAdapterFactory.java
deleted file mode 100644
index cb32b145e8b..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildAdapterFactory.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.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.constraints.DisplayUnit;
-import org.eclipse.papyrus.newchild.*;
-
-/**
- * <!-- 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.newchild.NewchildPackage
- * @generated
- */
-public class NewchildAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static NewchildPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = NewchildPackage.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 NewchildSwitch<Adapter> modelSwitch =
- new NewchildSwitch<Adapter>() {
- @Override
- public Adapter caseNewchildConfiguration(NewchildConfiguration object) {
- return createNewchildConfigurationAdapter();
- }
- @Override
- public Adapter caseMenuRoot(MenuRoot object) {
- return createMenuRootAdapter();
- }
- @Override
- public Adapter caseMenuItem(MenuItem object) {
- return createMenuItemAdapter();
- }
- @Override
- public Adapter caseMenuContainer(MenuContainer object) {
- return createMenuContainerAdapter();
- }
- @Override
- public Adapter caseMenu(Menu object) {
- return createMenuAdapter();
- }
- @Override
- public Adapter caseMenuAction(MenuAction object) {
- return createMenuActionAdapter();
- }
- @Override
- public Adapter caseNewChildMenu(NewChildMenu object) {
- return createNewChildMenuAdapter();
- }
- @Override
- public Adapter caseNewSiblingMenu(NewSiblingMenu object) {
- return createNewSiblingMenuAdapter();
- }
- @Override
- public Adapter caseSeparator(Separator object) {
- return createSeparatorAdapter();
- }
- @Override
- public Adapter caseMenuGroup(MenuGroup object) {
- return createMenuGroupAdapter();
- }
- @Override
- public Adapter caseDisplayUnit(DisplayUnit object) {
- return createDisplayUnitAdapter();
- }
- @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.newchild.NewchildConfiguration <em>Configuration</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.newchild.NewchildConfiguration
- * @generated
- */
- public Adapter createNewchildConfigurationAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.MenuRoot <em>Menu Root</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.papyrus.newchild.MenuRoot
- * @generated
- */
- public Adapter createMenuRootAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.MenuItem <em>Menu Item</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.newchild.MenuItem
- * @generated
- */
- public Adapter createMenuItemAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.MenuContainer <em>Menu Container</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.papyrus.newchild.MenuContainer
- * @generated
- */
- public Adapter createMenuContainerAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.Menu <em>Menu</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.newchild.Menu
- * @generated
- */
- public Adapter createMenuAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.MenuAction <em>Menu Action</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.newchild.MenuAction
- * @generated
- */
- public Adapter createMenuActionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.NewChildMenu <em>New Child Menu</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.newchild.NewChildMenu
- * @generated
- */
- public Adapter createNewChildMenuAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.NewSiblingMenu <em>New Sibling Menu</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.newchild.NewSiblingMenu
- * @generated
- */
- public Adapter createNewSiblingMenuAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.Separator <em>Separator</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.newchild.Separator
- * @generated
- */
- public Adapter createSeparatorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.MenuGroup <em>Menu Group</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.newchild.MenuGroup
- * @generated
- */
- public Adapter createMenuGroupAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.constraints.DisplayUnit <em>Display Unit</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.constraints.DisplayUnit
- * @generated
- */
- public Adapter createDisplayUnitAdapter() {
- 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;
- }
-
-} //NewchildAdapterFactory
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceFactoryImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceFactoryImpl.java
deleted file mode 100644
index 53d7b0b85bb..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceFactoryImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.util.NewchildResourceImpl
- * @generated
- */
-public class NewchildResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Resource createResource(URI uri) {
- XMLResource result = new NewchildResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //NewchildResourceFactoryImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceImpl.java
deleted file mode 100644
index 483e317753c..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.util.NewchildResourceFactoryImpl
- * @generated
- */
-public class NewchildResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public NewchildResourceImpl(URI uri) {
- super(uri);
- }
-
-} //NewchildResourceImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildSwitch.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildSwitch.java
deleted file mode 100644
index 621923ec4e3..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildSwitch.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.util;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
-
-import org.eclipse.papyrus.constraints.DisplayUnit;
-import org.eclipse.papyrus.newchild.*;
-
-/**
- * <!-- 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.newchild.NewchildPackage
- * @generated
- */
-public class NewchildSwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static NewchildPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildSwitch() {
- if (modelPackage == null) {
- modelPackage = NewchildPackage.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 NewchildPackage.NEWCHILD_CONFIGURATION: {
- NewchildConfiguration newchildConfiguration = (NewchildConfiguration)theEObject;
- T result = caseNewchildConfiguration(newchildConfiguration);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU_ROOT: {
- MenuRoot menuRoot = (MenuRoot)theEObject;
- T result = caseMenuRoot(menuRoot);
- if (result == null) result = caseMenuContainer(menuRoot);
- if (result == null) result = caseDisplayUnit(menuRoot);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU_ITEM: {
- MenuItem menuItem = (MenuItem)theEObject;
- T result = caseMenuItem(menuItem);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU_CONTAINER: {
- MenuContainer menuContainer = (MenuContainer)theEObject;
- T result = caseMenuContainer(menuContainer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU: {
- Menu menu = (Menu)theEObject;
- T result = caseMenu(menu);
- if (result == null) result = caseMenuContainer(menu);
- if (result == null) result = caseMenuItem(menu);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU_ACTION: {
- MenuAction menuAction = (MenuAction)theEObject;
- T result = caseMenuAction(menuAction);
- if (result == null) result = caseMenuItem(menuAction);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.NEW_CHILD_MENU: {
- NewChildMenu newChildMenu = (NewChildMenu)theEObject;
- T result = caseNewChildMenu(newChildMenu);
- if (result == null) result = caseMenu(newChildMenu);
- if (result == null) result = caseMenuContainer(newChildMenu);
- if (result == null) result = caseMenuItem(newChildMenu);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.NEW_SIBLING_MENU: {
- NewSiblingMenu newSiblingMenu = (NewSiblingMenu)theEObject;
- T result = caseNewSiblingMenu(newSiblingMenu);
- if (result == null) result = caseMenu(newSiblingMenu);
- if (result == null) result = caseMenuContainer(newSiblingMenu);
- if (result == null) result = caseMenuItem(newSiblingMenu);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.SEPARATOR: {
- Separator separator = (Separator)theEObject;
- T result = caseSeparator(separator);
- if (result == null) result = caseMenuItem(separator);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case NewchildPackage.MENU_GROUP: {
- MenuGroup menuGroup = (MenuGroup)theEObject;
- T result = caseMenuGroup(menuGroup);
- if (result == null) result = caseMenuContainer(menuGroup);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Configuration</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>Configuration</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseNewchildConfiguration(NewchildConfiguration object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu Root</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Menu Root</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenuRoot(MenuRoot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu Item</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>Menu Item</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenuItem(MenuItem object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu Container</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Menu Container</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenuContainer(MenuContainer object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu</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>Menu</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenu(Menu object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu Action</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>Menu Action</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenuAction(MenuAction object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>New Child Menu</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>New Child Menu</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseNewChildMenu(NewChildMenu object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>New Sibling Menu</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>New Sibling Menu</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseNewSiblingMenu(NewSiblingMenu object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Separator</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>Separator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseSeparator(Separator object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Menu Group</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>Menu Group</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMenuGroup(MenuGroup object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Display Unit</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>Display Unit</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDisplayUnit(DisplayUnit 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;
- }
-
-} //NewchildSwitch
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildXMLProcessor.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildXMLProcessor.java
deleted file mode 100644
index 0979380ff58..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildXMLProcessor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.papyrus.newchild.util;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-
-import org.eclipse.papyrus.newchild.NewchildPackage;
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class NewchildXMLProcessor extends XMLProcessor {
-
- /**
- * Public constructor to instantiate the helper.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewchildXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- NewchildPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the NewchildResourceFactoryImpl factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Map<String, Resource.Factory> getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new NewchildResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new NewchildResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //NewchildXMLProcessor
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/AbstractCustomFillElement.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/AbstractCustomFillElement.java
new file mode 100644
index 00000000000..663d9125cbf
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/AbstractCustomFillElement.java
@@ -0,0 +1,28 @@
+package org.eclipse.papyrus.newchild.menu;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.papyrus.newchild.CustomFiller;
+import org.eclipse.papyrus.newchild.MenuGroup;
+
+/**
+ * A base implementation for CustomFillElement
+ *
+ * @author Camille Letavernier
+ */
+public abstract class AbstractCustomFillElement implements CustomFillElement {
+
+ protected MenuGroup group;
+
+ protected CustomFiller filler;
+
+ public void setMenuItem(CustomFiller filler) {
+ this.filler = filler;
+ }
+
+ public void setParentGroup(MenuGroup group) {
+ this.group = group;
+ }
+
+ public abstract void fill(IMenuManager menuManager);
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/CustomFillElement.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/CustomFillElement.java
new file mode 100644
index 00000000000..51b36414815
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/CustomFillElement.java
@@ -0,0 +1,17 @@
+package org.eclipse.papyrus.newchild.menu;
+
+import org.eclipse.papyrus.newchild.CustomFiller;
+import org.eclipse.papyrus.newchild.MenuGroup;
+
+/**
+ * An interface for Custom menu filler
+ *
+ * @author Camille Letavernier
+ */
+public interface CustomFillElement extends FillElement {
+
+ public void setMenuItem(CustomFiller filler);
+
+ public void setParentGroup(MenuGroup group);
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java
index 7b14d69011f..fc6b4240c60 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java
@@ -18,7 +18,9 @@ public class FillMenuGroup extends FillMenuContainer {
public void fill(IMenuManager menuManager) {
for(MenuItem menuItem : container.getSubmenus()) {
FillElement filler = FillerFactory.instance.getFiller(group, menuItem, selectedObject);
- filler.fill(menuManager);
+ if(filler != null) {
+ filler.fill(menuManager);
+ }
}
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java
index 8b530011a57..0a670081ea5 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java
@@ -15,8 +15,10 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.newchild.Menu;
+import org.eclipse.papyrus.newchild.ElementPosition;
import org.eclipse.papyrus.newchild.MenuGroup;
+import org.eclipse.papyrus.newchild.NewChildKind;
+import org.eclipse.papyrus.newchild.NewChildMenu;
import org.eclipse.papyrus.newchild.action.CreateChildAction;
import org.eclipse.papyrus.newchild.runtime.DisabledContributionItem;
import org.eclipse.papyrus.newchild.util.EMFHelper;
@@ -29,17 +31,32 @@ public class FillNewChild extends FillMenu implements FillElement {
protected EObject selectedEObject;
- public FillNewChild(MenuGroup parentGroup, Menu menu, Object selectedObject) {
- super(parentGroup, menu, selectedObject);
+ protected NewChildMenu menu;
+ public FillNewChild(MenuGroup parentGroup, NewChildMenu menu, Object selectedObject) {
+ super(parentGroup, menu, selectedObject);
+ this.menu = menu;
this.selectedEObject = EMFHelper.getEObject(selectedObject);
}
@Override
public void fill(IMenuManager menuManager) {
- if(selectedEObject == null || EMFHelper.isReadOnly(selectedEObject)) {
- MenuHelper.add(parentGroup, menuManager, new DisabledContributionItem(menu.getName(), Util.getImage(menu), menu.getId()));
+ EObject parentEObject = selectedEObject;
+ if(menu.getPosition() == ElementPosition.SIBLING) {
+ if(selectedEObject != null) {
+ parentEObject = selectedEObject.eContainer();
+ }
+ }
+
+ if(parentEObject == null) {
+ return;
+ }
+
+ if(EMFHelper.isReadOnly(parentEObject)) {
+ DisabledContributionItem disabledItem = new DisabledContributionItem(menu.getName(), Util.getImage(menu), menu.getId());
+ disabledItem.setMenuStyle(true);
+ MenuHelper.add(parentGroup, menuManager, disabledItem);
return;
}
@@ -48,24 +65,53 @@ public class FillNewChild extends FillMenu implements FillElement {
Map<EStructuralFeature, List<EClass>> instantiableClasses = new HashMap<EStructuralFeature, List<EClass>>();
- for(EStructuralFeature feature : selectedEObject.eClass().getEAllStructuralFeatures()) {
+ for(EStructuralFeature feature : parentEObject.eClass().getEAllStructuralFeatures()) {
if(feature instanceof EReference && ((EReference)feature).isContainment()) {
EClass type = (EClass)feature.getEType();
instantiableClasses.put(feature, EMFHelper.getSubclassesOf(type, true));
}
}
- for(EStructuralFeature feature : instantiableClasses.keySet()) {
- IMenuManager subMenu = createChildMenu;
- if(instantiableClasses.size() > 1) {
- subMenu = new MenuManager(feature.getName());
+ NewChildKind kind = getKind(instantiableClasses);
+
+ if(kind == NewChildKind.FLAT) {
+ for(EStructuralFeature feature : instantiableClasses.keySet()) {
+ for(EClass eClass : instantiableClasses.get(feature)) {
+ addCreateActionToMenu(createChildMenu, parentEObject, eClass, (EReference)feature);
+ }
+ }
+ } else { //Hierarchical
+ for(EStructuralFeature feature : instantiableClasses.keySet()) {
+ IMenuManager subMenu = new MenuManager(feature.getName());
createChildMenu.add(subMenu);
+
+ for(EClass eClass : instantiableClasses.get(feature)) {
+ addCreateActionToMenu(subMenu, parentEObject, eClass, (EReference)feature);
+ }
}
+ }
+ }
+
+ private NewChildKind getKind(Map<EStructuralFeature, List<EClass>> instantiableClasses) {
+ if(menu.getKind() != NewChildKind.AUTO) {
+ return menu.getKind();
+ }
- for(EClass eClass : instantiableClasses.get(feature)) {
- addCreateActionToMenu(subMenu, selectedEObject, eClass, (EReference)feature);
+ if(instantiableClasses.size() < 2) {
+ return NewChildKind.FLAT;
+ }
+
+ if(instantiableClasses.size() > 5) {
+ return NewChildKind.HIERARCHICAL;
+ }
+
+ for(List<EClass> eClasses : instantiableClasses.values()) {
+ if(eClasses.size() > 5) {
+ return NewChildKind.HIERARCHICAL;
}
}
+
+ return NewChildKind.FLAT;
}
private void addCreateActionToMenu(IMenuManager menuManager, EObject parent, EClass createAs, EReference createIn) {
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewSibling.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewSibling.java
deleted file mode 100644
index 00976deff4e..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewSibling.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.papyrus.newchild.menu;
-
-import org.eclipse.papyrus.newchild.Menu;
-import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.util.EMFHelper;
-
-
-public class FillNewSibling extends FillNewChild {
-
- public FillNewSibling(MenuGroup parentGroup, Menu menu, Object selectedObject) {
- super(parentGroup, menu, EMFHelper.getEObject(selectedObject) != null ? EMFHelper.getEObject(selectedObject).eContainer() : selectedObject);
- }
-
-}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java
index 5f7a6d7cc01..432615d994f 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java
@@ -1,12 +1,13 @@
package org.eclipse.papyrus.newchild.menu;
+import org.eclipse.papyrus.extendedtypes.Activator;
+import org.eclipse.papyrus.newchild.CustomFiller;
import org.eclipse.papyrus.newchild.Menu;
import org.eclipse.papyrus.newchild.MenuContainer;
import org.eclipse.papyrus.newchild.MenuGroup;
import org.eclipse.papyrus.newchild.MenuItem;
import org.eclipse.papyrus.newchild.MenuRoot;
import org.eclipse.papyrus.newchild.NewChildMenu;
-import org.eclipse.papyrus.newchild.NewSiblingMenu;
import org.eclipse.papyrus.newchild.Separator;
@@ -16,11 +17,7 @@ public class FillerFactory {
public FillElement getFiller(MenuGroup parentGroup, MenuItem menuItem, Object selectedObject) {
if(menuItem instanceof NewChildMenu) {
- return new FillNewChild(parentGroup, (Menu)menuItem, selectedObject);
- }
-
- if(menuItem instanceof NewSiblingMenu) {
- return new FillNewSibling(parentGroup, (Menu)menuItem, selectedObject);
+ return new FillNewChild(parentGroup, (NewChildMenu)menuItem, selectedObject);
}
if(menuItem instanceof Separator) {
@@ -31,6 +28,29 @@ public class FillerFactory {
return new FillMenu(parentGroup, (Menu)menuItem, selectedObject);
}
+ if(menuItem instanceof CustomFiller) {
+ String className = ((CustomFiller)menuItem).getClassName();
+ if (className != null){
+ try {
+ Class<? extends CustomFillElement> clazz = Class.forName(className).asSubclass(CustomFillElement.class);
+ CustomFillElement filler = clazz.newInstance();
+ filler.setParentGroup(parentGroup);
+ filler.setMenuItem((CustomFiller)menuItem);
+ return filler;
+ } catch (ClassNotFoundException ex) {
+ Activator.log.error(ex);
+ } catch (InstantiationException ex) {
+ Activator.log.error(ex);
+ } catch (IllegalAccessException ex) {
+ Activator.log.error(ex);
+ } catch (ClassCastException ex) {
+ String message = "The CustomFiller must implement " + CustomFillElement.class.getName() + ". ";
+ message += "Class : " + className;
+ Activator.log.error(message, ex);
+ }
+ }
+ }
+
return null;
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/MyCustomFiller.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/MyCustomFiller.java
new file mode 100644
index 00000000000..b6c9698d612
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/MyCustomFiller.java
@@ -0,0 +1,17 @@
+package org.eclipse.papyrus.newchild.menu;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.papyrus.newchild.runtime.DisabledContributionItem;
+import org.eclipse.papyrus.newchild.util.MenuHelper;
+
+
+public class MyCustomFiller extends AbstractCustomFillElement {
+
+ @Override
+ public void fill(IMenuManager menuManager) {
+ DisabledContributionItem item = new DisabledContributionItem("MyCustomFiller", null, null);
+ item.setMenuStyle(true);
+ MenuHelper.add(group, menuManager, item);
+ }
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java
index bd6862b4b75..90bd808693b 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java
@@ -13,12 +13,18 @@ public class DisabledContributionItem extends ContributionItem {
protected ImageDescriptor image;
+ protected boolean menuStyle = false;
+
public DisabledContributionItem(String text, ImageDescriptor image, String id) {
this.text = text;
this.image = image;
setId(id);
}
+ public void setMenuStyle(boolean menuStyle) {
+ this.menuStyle = menuStyle;
+ }
+
@Override
public boolean isEnabled() {
return true;
@@ -28,9 +34,14 @@ public class DisabledContributionItem extends ContributionItem {
public void fill(Menu parent, int index) {
MenuItem item = new MenuItem(parent, SWT.CASCADE, index);
item.setText(text);
- item.setImage(image.createImage());
item.setEnabled(false);
- item.setMenu(new Menu(item));
+ if(image != null) {
+ item.setImage(image.createImage());
+ }
+
+ if(menuStyle) {
+ item.setMenu(new Menu(item));
+ }
}
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java
index 7b84a9fa0f0..1c43ccc2458 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java
@@ -275,13 +275,18 @@ public class EMFHelper {
public static boolean isReadOnly(EObject eObject) {
EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(eObject);
+ return isReadOnly(eObject, domain);
+ }
+
+ public static boolean isReadOnly(EObject eObject, EditingDomain domain) {
+ return isReadOnly(eObject.eResource(), domain);
+ }
+ public static boolean isReadOnly(Resource resource, EditingDomain domain) {
if(domain instanceof AdapterFactoryEditingDomain) {
- return ((AdapterFactoryEditingDomain)domain).isReadOnly(eObject.eResource());
+ return ((AdapterFactoryEditingDomain)domain).isReadOnly(resource);
}
-
- Resource resource = eObject.eResource();
if(resource == null) {
return false;
}

Back to the top