Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-07-25 08:30:59 -0400
committercletavernie2011-07-25 08:30:59 -0400
commit323b3e92c98294c9068f8da9226f8fe536a1f290 (patch)
tree2a13b11942f4ac23600be9bae99597dc2042cdd9
parent985ce5d8005cbf920f6e9d351f7a784e7c3a4e3b (diff)
downloadorg.eclipse.papyrus-323b3e92c98294c9068f8da9226f8fe536a1f290.tar.gz
org.eclipse.papyrus-323b3e92c98294c9068f8da9226f8fe536a1f290.tar.xz
org.eclipse.papyrus-323b3e92c98294c9068f8da9226f8fe536a1f290.zip
351802: [Constraints] The Property View constraints model should be more generic
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351802 351803: [New Child] Papyrus shall provide a customizable "New Child" menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=351803 351804: [EMF Embedded Editor] Papyrus shall provide an embedded EMF Editor https://bugs.eclipse.org/bugs/show_bug.cgi?id=351804
-rw-r--r--sandbox/org.eclipse.papyrus.constraints.customization/Model/ui/SingleSimpleConstraint.xwt36
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/Model/Constraints.ecore3
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/DisplayUnit.java3
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/ConstraintsPackageImpl.java2
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/DisplayUnitImpl.java2
-rw-r--r--sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/util/EMFHelper.java6
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/SandboxDialog.java43
-rw-r--r--sandbox/org.eclipse.papyrus.emf.embeddededitor/src/org/eclipse/papyrus/emf/embeddededitor/editor/EmbeddedEditor.java16
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/NewChild.ctx208
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomFiller.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleFilterPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuAction.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuContainer.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuGroup.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuItem.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuRoot.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicySet.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewEMFChildMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewchildConfiguration.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleReplacePolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleSeparator.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomFiller.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleFilterPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuAction.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuContainer.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuGroup.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuItem.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuRoot.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicySet.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewEMFChildMenu.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewchildConfiguration.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleReplacePolicy.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleSeparator.xwt2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild.customization/custom/newchild.uiCustom43
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF3
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore62
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi28
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/build.properties4
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuAction.java33
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuRoot.java4
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java88
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildConfiguration.java18
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildFactory.java9
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewchildPackage.java259
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuActionImpl.java71
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java2
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java222
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildConfigurationImpl.java38
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildFactoryImpl.java59
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewchildPackageImpl.java124
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CreateIn.java (renamed from sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ElementPosition.java)78
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CustomPolicy.java53
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/FilterPolicy.java21
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/Layout.java (renamed from sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildKind.java)38
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyFactory.java82
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyPackage.java801
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicy.java91
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicySet.java73
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewEMFChildMenu.java108
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/ReplacePolicy.java46
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/CustomPolicyImpl.java166
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/FilterPolicyImpl.java43
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyFactoryImpl.java218
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyPackageImpl.java460
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicyImpl.java244
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicySetImpl.java227
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewEMFChildMenuImpl.java280
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/ReplacePolicyImpl.java155
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyAdapterFactory.java292
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceFactoryImpl.java56
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceImpl.java32
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicySwitch.java292
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyXMLProcessor.java54
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildAdapterFactory.java18
-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.java24
-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/Activator.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/CreateChildAction.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/ExtendedTypeAction.java82
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/AbstractCustomFillElement.java16
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/CustomFillElement.java14
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillElement.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenu.java35
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuAction.java49
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuContainer.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuGroup.java56
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuRoot.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillNewChild.java100
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillSeparator.java16
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillerFactory.java25
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/MyCustomFiller.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/AbstractFillPolicy.java48
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/FilterFillPolicy.java26
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/NewChildFillPolicy.java75
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyManager.java35
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyMatcher.java78
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/ReplaceFillPolicy.java37
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/DisabledContributionItem.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/MenuConstraintEngine.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/NewchildManager.java83
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/EMFHelper.java11
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/MenuHelper.java40
-rw-r--r--sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/Util.java11
113 files changed, 5362 insertions, 1107 deletions
diff --git a/sandbox/org.eclipse.papyrus.constraints.customization/Model/ui/SingleSimpleConstraint.xwt b/sandbox/org.eclipse.papyrus.constraints.customization/Model/ui/SingleSimpleConstraint.xwt
index 0c5aa3b148c..197c365e5e0 100644
--- a/sandbox/org.eclipse.papyrus.constraints.customization/Model/ui/SingleSimpleConstraint.xwt
+++ b/sandbox/org.eclipse.papyrus.constraints.customization/Model/ui/SingleSimpleConstraint.xwt
@@ -1,2 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="constraints:ConstraintDescriptor:name"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout></Composite.layout><ppe:BooleanRadio input="{Binding}" property="constraints:ConstraintDescriptor:overrideable"></ppe:BooleanRadio></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:ReferenceDialog input="{Binding}" property="constraints:SimpleConstraint:constraintType"></ppe:ReferenceDialog></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:MultiReference input="{Binding}" property="constraints:ConstraintDescriptor:overriddenConstraints"></ppe:MultiReference></Composite></Composite> \ No newline at end of file
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="constraints:ConstraintDescriptor:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="constraints:ConstraintDescriptor:overrideable"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="constraints:SimpleConstraint:constraintType"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="constraints:ConstraintDescriptor:overriddenConstraints"></ppe:MultiReference>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.constraints/Model/Constraints.ecore b/sandbox/org.eclipse.papyrus.constraints/Model/Constraints.ecore
index fbaa7e86ef9..fd675741c87 100644
--- a/sandbox/org.eclipse.papyrus.constraints/Model/Constraints.ecore
+++ b/sandbox/org.eclipse.papyrus.constraints/Model/Constraints.ecore
@@ -6,7 +6,8 @@
<eClassifiers xsi:type="ecore:EClass" name="DisplayUnit" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="constraints" upperBound="-1"
eType="#//ConstraintDescriptor" containment="true" eOpposite="#//ConstraintDescriptor/display"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="elementMultiplicity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="elementMultiplicity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="1"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ConstraintDescriptor" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
diff --git a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/DisplayUnit.java b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/DisplayUnit.java
index f05094e53a2..4793eff1ba1 100644
--- a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/DisplayUnit.java
+++ b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/DisplayUnit.java
@@ -48,6 +48,7 @@ public interface DisplayUnit extends EObject {
/**
* Returns the value of the '<em><b>Element Multiplicity</b></em>' attribute.
+ * The default value is <code>"1"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Element Multiplicity</em>' attribute isn't clear,
@@ -57,7 +58,7 @@ public interface DisplayUnit extends EObject {
* @return the value of the '<em>Element Multiplicity</em>' attribute.
* @see #setElementMultiplicity(int)
* @see org.eclipse.papyrus.constraints.ConstraintsPackage#getDisplayUnit_ElementMultiplicity()
- * @model
+ * @model default="1"
* @generated
*/
int getElementMultiplicity();
diff --git a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/ConstraintsPackageImpl.java b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/ConstraintsPackageImpl.java
index 11d2c1c7d9f..2b7f9c28b76 100644
--- a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/ConstraintsPackageImpl.java
+++ b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/ConstraintsPackageImpl.java
@@ -417,7 +417,7 @@ public class ConstraintsPackageImpl extends EPackageImpl implements ConstraintsP
// Initialize classes and features; add operations and parameters
initEClass(displayUnitEClass, DisplayUnit.class, "DisplayUnit", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getDisplayUnit_Constraints(), this.getConstraintDescriptor(), this.getConstraintDescriptor_Display(), "constraints", null, 0, -1, DisplayUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getDisplayUnit_ElementMultiplicity(), ecorePackage.getEInt(), "elementMultiplicity", null, 0, 1, DisplayUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDisplayUnit_ElementMultiplicity(), ecorePackage.getEInt(), "elementMultiplicity", "1", 0, 1, DisplayUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(constraintDescriptorEClass, ConstraintDescriptor.class, "ConstraintDescriptor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getConstraintDescriptor_Name(), ecorePackage.getEString(), "name", null, 1, 1, ConstraintDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/DisplayUnitImpl.java b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/DisplayUnitImpl.java
index 9c27a4b8443..32dd7f4f436 100644
--- a/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/DisplayUnitImpl.java
+++ b/sandbox/org.eclipse.papyrus.constraints/src-gen/org/eclipse/papyrus/constraints/impl/DisplayUnitImpl.java
@@ -59,7 +59,7 @@ public abstract class DisplayUnitImpl extends EObjectImpl implements DisplayUnit
* @generated
* @ordered
*/
- protected static final int ELEMENT_MULTIPLICITY_EDEFAULT = 0;
+ protected static final int ELEMENT_MULTIPLICITY_EDEFAULT = 1;
/**
* The cached value of the '{@link #getElementMultiplicity() <em>Element Multiplicity</em>}' attribute.
* <!-- begin-user-doc -->
diff --git a/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/util/EMFHelper.java b/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/util/EMFHelper.java
index b771dc93b62..3bfadae8f86 100644
--- a/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/util/EMFHelper.java
+++ b/sandbox/org.eclipse.papyrus.constraints/src/org/eclipse/papyrus/constraints/util/EMFHelper.java
@@ -117,12 +117,6 @@ public class EMFHelper {
List<EClass> superTypes = eClass.getEAllSuperTypes();
if(superTypes.contains(fromClass)) {
return true;
- } else {
- for(EClass superClass : superTypes) {
- if(isSubclass(superClass, fromClass)) {
- return true;
- }
- }
}
return false;
}
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
index 9d3837e1769..e94856f6e76 100644
--- 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
@@ -4,9 +4,17 @@ import java.util.EventObject;
import java.util.Set;
import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.TrayDialog;
@@ -177,11 +185,7 @@ public class SandboxDialog extends TrayDialog {
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 = createEditor(editorPart);
editor.addCommandStackListener(new CommandStackListener() {
@@ -195,6 +199,35 @@ public class SandboxDialog extends TrayDialog {
}
}
+ private EmbeddedEditor createEditor(Composite parent) {
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ //Simple editor
+ // resourceSet.getResource(URI.createPlatformResourceURI("org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi", true), true);
+
+ //UML Editor with ExtendedType support
+ resourceSet.getResource(URI.createPlatformResourceURI("Test/elementType.uml", true), true);
+ TransactionalCommandStack commandStack = new TransactionalCommandStackImpl();
+ AdapterFactory adapterFactory = createAdapterFactory();
+ TransactionalEditingDomainImpl editingDomain = new TransactionalEditingDomainImpl(adapterFactory, commandStack, resourceSet);
+
+
+ editor = new EmbeddedEditor(resourceSet, adapterFactory, editingDomain);
+ editor.createWidget(parent);
+
+ return editor;
+ }
+
+ private AdapterFactory createAdapterFactory() {
+ ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ return adapterFactory;
+ }
+
private void createPropertiesPart(Composite bottomPart) {
final ScrolledComposite scrolled = new ScrolledComposite(bottomPart, SWT.NONE | SWT.H_SCROLL | SWT.V_SCROLL);
scrolled.getVerticalBar().setIncrement(8);
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 71669245218..f8210686357 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
@@ -85,7 +85,7 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
protected ResourceSet resourceSet;
- protected AdapterFactoryEditingDomain editingDomain;
+ protected EditingDomain editingDomain;
protected AdapterFactory adapterFactory;
@@ -99,10 +99,22 @@ public class EmbeddedEditor implements CommandStackListener, IMenuListener {
}
CommandStack commandStack = new BasicCommandStack();
- adapterFactory = createAdapterFactory();
+ AdapterFactory adapterFactory = createAdapterFactory();
editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet);
+ AdapterFactoryEditingDomain editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet);
editingDomain.setResourceToReadOnlyMap(new HashMap<Resource, Boolean>());
+
+ configure(resourceSet, adapterFactory, editingDomain);
+ }
+
+ public EmbeddedEditor(ResourceSet resourceSet, AdapterFactory adapterFactory, EditingDomain editingDomain) {
+ configure(resourceSet, adapterFactory, editingDomain);
+ }
+
+ protected void configure(ResourceSet resourceSet, AdapterFactory adapterFactory, EditingDomain editingDomain) {
this.resourceSet = resourceSet;
+ this.adapterFactory = adapterFactory;
+ this.editingDomain = editingDomain;
editingDomainAdapter = new EditingDomainProviderAdapter(editingDomain);
resourceSet.eAdapters().add(editingDomainAdapter);
}
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/NewChild.ctx b/sandbox/org.eclipse.papyrus.newchild.customization/Model/NewChild.ctx
index 494985d9769..4d8a8559075 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/NewChild.ctx
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/NewChild.ctx
@@ -20,9 +20,6 @@
<sections name="Single MenuAction" sectionFile="ui/SingleMenuAction.xwt">
<widget href="ui/SingleMenuAction.xwt#/"/>
</sections>
- <sections name="Single NewChildMenu" sectionFile="ui/SingleNewChildMenu.xwt">
- <widget href="ui/SingleNewChildMenu.xwt#/"/>
- </sections>
<sections name="Single Separator" sectionFile="ui/SingleSeparator.xwt">
<widget href="ui/SingleSeparator.xwt#/"/>
</sections>
@@ -50,9 +47,6 @@
<sections name="Multiple MenuAction" sectionFile="ui/MultipleMenuAction.xwt">
<widget href="ui/MultipleMenuAction.xwt#/"/>
</sections>
- <sections name="Multiple NewChildMenu" sectionFile="ui/MultipleNewChildMenu.xwt">
- <widget href="ui/MultipleNewChildMenu.xwt#/"/>
- </sections>
<sections name="Multiple Separator" sectionFile="ui/MultipleSeparator.xwt">
<widget href="ui/MultipleSeparator.xwt#/"/>
</sections>
@@ -62,6 +56,42 @@
<sections name="Multiple CustomFiller" sectionFile="ui/MultipleCustomFiller.xwt">
<widget href="ui/MultipleCustomFiller.xwt#/"/>
</sections>
+ <sections name="Single NewEMFChildMenu" sectionFile="ui/SingleNewEMFChildMenu.xwt">
+ <widget href="ui/SingleNewEMFChildMenu.xwt#/"/>
+ </sections>
+ <sections name="Multiple NewEMFChildMenu" sectionFile="ui/MultipleNewEMFChildMenu.xwt">
+ <widget href="ui/MultipleNewEMFChildMenu.xwt#/"/>
+ </sections>
+ <sections name="Single NewChildPolicySet" sectionFile="ui/SingleNewChildPolicySet.xwt">
+ <widget href="ui/SingleNewChildPolicySet.xwt#/"/>
+ </sections>
+ <sections name="Multiple NewChildPolicySet" sectionFile="ui/MultipleNewChildPolicySet.xwt">
+ <widget href="ui/MultipleNewChildPolicySet.xwt#/"/>
+ </sections>
+ <sections name="Single NewChildPolicy" sectionFile="ui/SingleNewChildPolicy.xwt">
+ <widget href="ui/SingleNewChildPolicy.xwt#/"/>
+ </sections>
+ <sections name="Multiple NewChildPolicy" sectionFile="ui/MultipleNewChildPolicy.xwt">
+ <widget href="ui/MultipleNewChildPolicy.xwt#/"/>
+ </sections>
+ <sections name="Single FilterPolicy" sectionFile="ui/SingleFilterPolicy.xwt">
+ <widget href="ui/SingleFilterPolicy.xwt#/"/>
+ </sections>
+ <sections name="Multiple FilterPolicy" sectionFile="ui/MultipleFilterPolicy.xwt">
+ <widget href="ui/MultipleFilterPolicy.xwt#/"/>
+ </sections>
+ <sections name="Single ReplacePolicy" sectionFile="ui/SingleReplacePolicy.xwt">
+ <widget href="ui/SingleReplacePolicy.xwt#/"/>
+ </sections>
+ <sections name="Multiple ReplacePolicy" sectionFile="ui/MultipleReplacePolicy.xwt">
+ <widget href="ui/MultipleReplacePolicy.xwt#/"/>
+ </sections>
+ <sections name="Single CustomPolicy" sectionFile="ui/SingleCustomPolicy.xwt">
+ <widget href="ui/SingleCustomPolicy.xwt#/"/>
+ </sections>
+ <sections name="Multiple CustomPolicy" sectionFile="ui/MultipleCustomPolicy.xwt">
+ <widget href="ui/MultipleCustomPolicy.xwt#/"/>
+ </sections>
</tabs>
<views name="Single NewchildConfiguration" sections="//@tabs.0/@sections.0" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
<constraints xsi:type="contexts:SimpleConstraint" name="isSingleNewchildConfiguration">
@@ -87,8 +117,8 @@
<views name="Single MenuContainer" sections="//@tabs.0/@sections.3" automaticContext="true" datacontexts="//@dataContexts.0/@elements.3">
<constraints xsi:type="contexts:SimpleConstraint" name="isSingleMenuContainer">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuContainer"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
<views name="Single Menu" sections="//@tabs.0/@sections.4" automaticContext="true" datacontexts="//@dataContexts.0/@elements.4">
@@ -105,110 +135,182 @@
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Single NewChildMenu" sections="//@tabs.0/@sections.6" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
- <constraints xsi:type="contexts:SimpleConstraint" name="isSingleNewChildMenu">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildMenu"/>
- </constraints>
- </views>
- <views name="Single Separator" sections="//@tabs.0/@sections.7" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
+ <views name="Single Separator" sections="//@tabs.0/@sections.6" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
<constraints xsi:type="contexts:SimpleConstraint" name="isSingleSeparator">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="Separator"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="Separator"/>
</constraints>
</views>
- <views name="Single MenuGroup" sections="//@tabs.0/@sections.8" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
+ <views name="Single MenuGroup" sections="//@tabs.0/@sections.7" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
<constraints xsi:type="contexts:SimpleConstraint" name="isSingleMenuGroup">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="MenuGroup"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="MenuGroup"/>
</constraints>
</views>
- <views name="Single CustomFiller" sections="//@tabs.0/@sections.9" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9">
+ <views name="Single CustomFiller" sections="//@tabs.0/@sections.8" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
<constraints xsi:type="contexts:SimpleConstraint" name="isSingleCustomFiller">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CustomFiller"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Multiple NewchildConfiguration" sections="//@tabs.0/@sections.10" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <views name="Multiple NewchildConfiguration" sections="//@tabs.0/@sections.9" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleNewchildConfiguration">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="NewchildConfiguration"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewchildConfiguration"/>
</constraints>
</views>
- <views name="Multiple MenuRoot" sections="//@tabs.0/@sections.11" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.1">
+ <views name="Multiple MenuRoot" sections="//@tabs.0/@sections.10" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.1">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenuRoot">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuRoot"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Multiple MenuItem" sections="//@tabs.0/@sections.12" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.2">
+ <views name="Multiple MenuItem" sections="//@tabs.0/@sections.11" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.2">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenuItem">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuItem"/>
</constraints>
</views>
- <views name="Multiple MenuContainer" sections="//@tabs.0/@sections.13" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.3">
+ <views name="Multiple MenuContainer" sections="//@tabs.0/@sections.12" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.3">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenuContainer">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuContainer"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Multiple Menu" sections="//@tabs.0/@sections.14" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.4">
+ <views name="Multiple Menu" sections="//@tabs.0/@sections.13" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.4">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenu">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="Menu"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="Menu"/>
</constraints>
</views>
- <views name="Multiple MenuAction" sections="//@tabs.0/@sections.15" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.5">
+ <views name="Multiple MenuAction" sections="//@tabs.0/@sections.14" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.5">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenuAction">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuAction"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Multiple NewChildMenu" sections="//@tabs.0/@sections.16" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
- <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleNewChildMenu">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
- <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildMenu"/>
- </constraints>
- </views>
- <views name="Multiple Separator" sections="//@tabs.0/@sections.17" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
+ <views name="Multiple Separator" sections="//@tabs.0/@sections.15" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleSeparator">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Separator"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
</constraints>
</views>
- <views name="Multiple MenuGroup" sections="//@tabs.0/@sections.18" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
+ <views name="Multiple MenuGroup" sections="//@tabs.0/@sections.16" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleMenuGroup">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="MenuGroup"/>
</constraints>
</views>
- <views name="Multiple CustomFiller" sections="//@tabs.0/@sections.19" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9">
+ <views name="Multiple CustomFiller" sections="//@tabs.0/@sections.17" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
<constraints xsi:type="contexts:SimpleConstraint" name="isMultipleCustomFiller">
<constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CustomFiller"/>
</constraints>
</views>
+ <views name="Single NewEMFChildMenu" sections="//@tabs.0/@sections.18" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.0">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleNewEMFChildMenu">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewEMFChildMenu"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Multiple NewEMFChildMenu" sections="//@tabs.0/@sections.19" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.0">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleNewEMFChildMenu">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewEMFChildMenu"/>
+ </constraints>
+ </views>
+ <views name="Single NewChildPolicySet" sections="//@tabs.0/@sections.20" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.1">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleNewChildPolicySet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildPolicySet"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Multiple NewChildPolicySet" sections="//@tabs.0/@sections.21" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.1">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleNewChildPolicySet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildPolicySet"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Single NewChildPolicy" sections="//@tabs.0/@sections.22" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.2">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleNewChildPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildPolicy"/>
+ </constraints>
+ </views>
+ <views name="Multiple NewChildPolicy" sections="//@tabs.0/@sections.23" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.2">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleNewChildPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="NewChildPolicy"/>
+ </constraints>
+ </views>
+ <views name="Single FilterPolicy" sections="//@tabs.0/@sections.24" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.3">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleFilterPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="FilterPolicy"/>
+ </constraints>
+ </views>
+ <views name="Multiple FilterPolicy" sections="//@tabs.0/@sections.25" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.3">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleFilterPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="FilterPolicy"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Single ReplacePolicy" sections="//@tabs.0/@sections.26" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.4">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleReplacePolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="ReplacePolicy"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Multiple ReplacePolicy" sections="//@tabs.0/@sections.27" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.4">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleReplacePolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="ReplacePolicy"/>
+ </constraints>
+ </views>
+ <views name="Single CustomPolicy" sections="//@tabs.0/@sections.28" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.5">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleCustomPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="CustomPolicy"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
+ <views name="Multiple CustomPolicy" sections="//@tabs.0/@sections.29" elementMultiplicity="-1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9/@elements.5">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleCustomPolicy">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="contexts:ValueProperty" name="className" value="CustomPolicy"/>
+ <properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/newchild/policy"/>
+ </constraints>
+ </views>
<dataContexts name="newchild" label="newchild">
<elements name="NewchildConfiguration">
<properties name="roots" type="Reference" multiplicity="-1"/>
+ <properties name="name"/>
</elements>
<elements name="MenuRoot">
<properties name="groups" type="Reference" multiplicity="-1"/>
+ <properties name="name"/>
<supertypes href="#//@dataContexts.0/@elements.3"/>
<supertypes href="ppe:/context/org.eclipse.papyrus.constraints.customization/Model/Constraints.ctx#//@dataContexts.0/@elements.0"/>
</elements>
@@ -224,11 +326,6 @@
</elements>
<elements name="MenuAction" supertypes="//@dataContexts.0/@elements.2">
<properties name="elementType" type="Reference"/>
- <properties name="position" type="Enumeration"/>
- </elements>
- <elements name="NewChildMenu" supertypes="//@dataContexts.0/@elements.4">
- <properties name="position" type="Enumeration"/>
- <properties name="kind" type="Enumeration"/>
</elements>
<elements name="Separator" supertypes="//@dataContexts.0/@elements.2"/>
<elements name="MenuGroup" supertypes="//@dataContexts.0/@elements.3">
@@ -239,6 +336,29 @@
<elements name="CustomFiller" supertypes="//@dataContexts.0/@elements.2">
<properties name="className"/>
</elements>
+ <elements xsi:type="contexts:DataContextPackage" name="ncpolicy">
+ <elements name="NewEMFChildMenu" supertypes="//@dataContexts.0/@elements.4">
+ <properties name="createIn" type="Enumeration"/>
+ <properties name="layout" type="Enumeration"/>
+ </elements>
+ <elements name="NewChildPolicySet">
+ <properties name="name"/>
+ <properties name="policies" type="Reference" multiplicity="-1"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.constraints.customization/Model/Constraints.ctx#//@dataContexts.0/@elements.0"/>
+ </elements>
+ <elements name="NewChildPolicy">
+ <properties name="roles" multiplicity="-1"/>
+ <properties name="eClasses" type="Reference" multiplicity="-1"/>
+ <properties name="name"/>
+ </elements>
+ <elements name="FilterPolicy" supertypes="//@dataContexts.0/@elements.9/@elements.2"/>
+ <elements name="ReplacePolicy" supertypes="//@dataContexts.0/@elements.9/@elements.2">
+ <properties name="replaceWith" type="Reference" multiplicity="-1"/>
+ </elements>
+ <elements name="CustomPolicy" supertypes="//@dataContexts.0/@elements.9/@elements.2">
+ <properties name="className"/>
+ </elements>
+ </elements>
<modelElementFactory href="ppe:/environment/org.eclipse.papyrus.properties/model/Environment.xmi#//@modelElementFactories.0"/>
</dataContexts>
</contexts:Context>
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomFiller.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomFiller.xwt
index 5456a57ca8a..ff7d91f3f18 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomFiller.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomFiller.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:CustomFiller:className"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:CustomFiller:className"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomPolicy.xwt
new file mode 100644
index 00000000000..9c2a1c12134
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleCustomPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:ncpolicy:CustomPolicy:className"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleFilterPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleFilterPolicy.xwt
new file mode 100644
index 00000000000..0bb8f23c3d9
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleFilterPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenu.xwt
index f21059fd795..1d627611acb 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenu.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenu.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuAction.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuAction.xwt
index 586569e5133..3cdd622a374 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuAction.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuAction.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuAction:position"></ppe:EnumCombo></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:ReferenceDialog input="{Binding}" property="newchild:MenuAction:elementType"></ppe:ReferenceDialog></Composite></Composite> \ No newline at end of file
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuContainer.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuContainer.xwt
index 506d138f590..0bb8f23c3d9 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuContainer.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuContainer.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuGroup.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuGroup.xwt
index a3bcc682a36..c2443a2f3ff 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuGroup.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuGroup.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:before"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:after"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuGroup:absolutePosition"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:before"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:after"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuGroup:absolutePosition"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuItem.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuItem.xwt
index 506d138f590..0bb8f23c3d9 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuItem.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuItem.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuRoot.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuRoot.xwt
index 30ac9551a19..0bb8f23c3d9 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuRoot.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleMenuRoot.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildMenu.xwt
deleted file mode 100644
index 3541d99969d..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildMenu.xwt
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:NewChildMenu:position"></ppe:EnumCombo><ppe:EnumCombo input="{Binding}" property="newchild:NewChildMenu:kind"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicy.xwt
new file mode 100644
index 00000000000..0bb8f23c3d9
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicySet.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicySet.xwt
new file mode 100644
index 00000000000..b46518daf35
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewChildPolicySet.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewEMFChildMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewEMFChildMenu.xwt
new file mode 100644
index 00000000000..3dc2424ce94
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewEMFChildMenu.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:ncpolicy:NewEMFChildMenu:createIn"></ppe:EnumCombo><ppe:EnumCombo input="{Binding}" property="newchild:ncpolicy:NewEMFChildMenu:layout"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewchildConfiguration.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewchildConfiguration.xwt
index 506d138f590..0bb8f23c3d9 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewchildConfiguration.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleNewchildConfiguration.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleReplacePolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleReplacePolicy.xwt
new file mode 100644
index 00000000000..0bb8f23c3d9
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleReplacePolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleSeparator.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleSeparator.xwt
index 506d138f590..16c43716496 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleSeparator.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/MultipleSeparator.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomFiller.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomFiller.xwt
index b66f2ef5da5..c1e0de9addb 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomFiller.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomFiller.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:CustomFiller:className"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:CustomFiller:className"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomPolicy.xwt
new file mode 100644
index 00000000000..2030a41b650
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleCustomPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor property="newchild:ncpolicy:NewChildPolicy:name" input="{Binding}"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:ncpolicy:CustomPolicy:className"></ppe:StringEditor><ppe:MultiString input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:roles"></ppe:MultiString><ppe:MultiReference input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:eClasses"></ppe:MultiReference></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleFilterPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleFilterPolicy.xwt
new file mode 100644
index 00000000000..d6a0122f2b0
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleFilterPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor property="newchild:ncpolicy:NewChildPolicy:name" input="{Binding}"></ppe:StringEditor><ppe:MultiReference input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:eClasses"></ppe:MultiReference><ppe:MultiString input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:roles"></ppe:MultiString></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenu.xwt
index f34f8b612e1..c073d659052 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenu.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenu.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:name"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:name"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuAction.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuAction.xwt
index 5d60178ed9d..ff855b18230 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuAction.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuAction.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuAction:position"></ppe:EnumCombo></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:ReferenceDialog input="{Binding}" property="newchild:MenuAction:elementType"></ppe:ReferenceDialog></Composite></Composite> \ No newline at end of file
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:ReferenceDialog input="{Binding}" property="newchild:MenuAction:elementType"></ppe:ReferenceDialog></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuContainer.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuContainer.xwt
index 506d138f590..0bb8f23c3d9 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuContainer.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuContainer.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuGroup.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuGroup.xwt
index a3bcc682a36..c2443a2f3ff 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuGroup.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuGroup.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:before"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:after"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuGroup:absolutePosition"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:before"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuGroup:after"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:MenuGroup:absolutePosition"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuItem.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuItem.xwt
index 8e581d8ea75..68ffaf12f5e 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuItem.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuItem.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuRoot.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuRoot.xwt
index 506d138f590..4e433091694 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuRoot.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleMenuRoot.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuRoot:name"></ppe:StringEditor><ppe:MultiReference property="constraints:DisplayUnit:constraints" input="{Binding}"></ppe:MultiReference></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildMenu.xwt
deleted file mode 100644
index 1b94f4908c1..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildMenu.xwt
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:name"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:NewChildMenu:position"></ppe:EnumCombo><ppe:EnumCombo input="{Binding}" property="newchild:NewChildMenu:kind"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicy.xwt
new file mode 100644
index 00000000000..023b9fd1851
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:MultiString input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:roles"></ppe:MultiString></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:MultiReference input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:eClasses"></ppe:MultiReference></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicySet.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicySet.xwt
new file mode 100644
index 00000000000..180c42079fe
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewChildPolicySet.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:ncpolicy:NewChildPolicySet:name"></ppe:StringEditor><ppe:MultiReference property="constraints:DisplayUnit:constraints" input="{Binding}"></ppe:MultiReference></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewEMFChildMenu.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewEMFChildMenu.xwt
new file mode 100644
index 00000000000..a2a56c9cb75
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewEMFChildMenu.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:Menu:name"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:Menu:icon"></ppe:StringEditor><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="newchild:ncpolicy:NewEMFChildMenu:createIn"></ppe:EnumCombo><ppe:EnumCombo input="{Binding}" property="newchild:ncpolicy:NewEMFChildMenu:layout"></ppe:EnumCombo></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewchildConfiguration.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewchildConfiguration.xwt
index 506d138f590..82af1df5e88 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewchildConfiguration.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleNewchildConfiguration.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout></Composite> \ No newline at end of file
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:NewchildConfiguration:name"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleReplacePolicy.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleReplacePolicy.xwt
new file mode 100644
index 00000000000..abf8c8b3568
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleReplacePolicy.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor property="newchild:ncpolicy:NewChildPolicy:name" input="{Binding}"></ppe:StringEditor><ppe:MultiReference input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:eClasses"></ppe:MultiReference><ppe:MultiString input="{Binding}" property="newchild:ncpolicy:NewChildPolicy:roles"></ppe:MultiString></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleSeparator.xwt b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleSeparator.xwt
index 8e581d8ea75..68ffaf12f5e 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleSeparator.xwt
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/Model/ui/SingleSeparator.xwt
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="newchild:MenuItem:id"></ppe:StringEditor></Composite></Composite> \ No newline at end of file
diff --git a/sandbox/org.eclipse.papyrus.newchild.customization/custom/newchild.uiCustom b/sandbox/org.eclipse.papyrus.newchild.customization/custom/newchild.uiCustom
index e112902e7b2..9771e75cc93 100644
--- a/sandbox/org.eclipse.papyrus.newchild.customization/custom/newchild.uiCustom
+++ b/sandbox/org.eclipse.papyrus.newchild.customization/custom/newchild.uiCustom
@@ -6,6 +6,11 @@
<defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
</customizedFeatures>
</references>
+ <references referenceName="newChildPolicies">
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
</types>
<types metaclassName="newchild.MenuAction">
<references referenceName="elementType">
@@ -28,6 +33,44 @@
</customizedFeatures>
</references>
<references referenceName="constraints">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="newchild.ncpolicy.ReplacePolicy">
+ <references referenceName="replaceWith">
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="eClasses">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="newchild.ncpolicy.NewChildPolicySet">
+ <references referenceName="constraints">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="policies">
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="newchild.ncpolicy.NewChildPolicy">
+ <references referenceName="eClasses">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="newchild.ncpolicy.NewEMFChildMenu">
+ <references referenceName="groups">
<customizedFeatures customizedFeature="collapseLink">
<defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
</customizedFeatures>
diff --git a/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
index 6bd9c5fef7a..033ec438a07 100644
--- a/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
+++ b/sandbox/org.eclipse.papyrus.newchild/META-INF/MANIFEST.MF
@@ -22,5 +22,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.papyrus.log;bundle-version="0.8.0",
org.eclipse.emf.edit.ui;bundle-version="2.7.0",
- org.eclipse.papyrus.constraints;bundle-version="0.9.0"
+ org.eclipse.papyrus.constraints;bundle-version="0.9.0",
+ org.eclipse.papyrus.core;bundle-version="0.8.0"
Bundle-ActivationPolicy: lazy
diff --git a/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore b/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
index 48441fd8143..d1fc2faad09 100644
--- a/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
+++ b/sandbox/org.eclipse.papyrus.newchild/Model/NewChild.ecore
@@ -7,6 +7,8 @@
<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"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="newChildPolicies" upperBound="-1"
+ eType="#//ncpolicy/NewChildPolicySet" containment="true"/>
</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"
@@ -27,18 +29,6 @@
<eClassifiers xsi:type="ecore:EClass" name="MenuAction" eSuperTypes="#//MenuItem">
<eStructuralFeatures xsi:type="ecore:EReference" name="elementType" lowerBound="1"
eType="ecore:EClass platform:/plugin/org.eclipse.papyrus.extendedtypes/model/ExtendedTypes.ecore#//ExtendedElementTypeConfiguration"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="position" lowerBound="1"
- eType="#//ElementPosition" defaultValueLiteral="child"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="ElementPosition">
- <eLiterals name="child"/>
- <eLiterals name="sibling" value="1"/>
- </eClassifiers>
- <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">
@@ -51,13 +41,51 @@
<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>
+ <eSubpackages name="ncpolicy" nsURI="http://www.eclipse.org/papyrus/newchild/policy"
+ nsPrefix="ncpolicy">
+ <eClassifiers xsi:type="ecore:EEnum" name="CreateIn">
+ <eLiterals name="self" literal="self"/>
+ <eLiterals name="parent" value="1" literal="parent"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="Layout">
+ <eLiterals name="hierarchical"/>
+ <eLiterals name="flat" value="1"/>
+ <eLiterals name="auto" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NewEMFChildMenu" eSuperTypes="#//Menu">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="createIn" lowerBound="1"
+ eType="#//ncpolicy/CreateIn" defaultValueLiteral="self"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="layout" lowerBound="1"
+ eType="#//ncpolicy/Layout" defaultValueLiteral="hierarchical"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1"
+ eType="#//MenuGroup" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NewChildPolicySet" eSuperTypes="../../org.eclipse.papyrus.constraints/Model/Constraints.ecore#//DisplayUnit">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="policies" upperBound="-1"
+ eType="#//ncpolicy/NewChildPolicy" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NewChildPolicy" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="roles" upperBound="-1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="eClasses" upperBound="-1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
+ <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="FilterPolicy" eSuperTypes="#//ncpolicy/NewChildPolicy"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ReplacePolicy" eSuperTypes="#//ncpolicy/NewChildPolicy">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="replaceWith" lowerBound="1"
+ upperBound="-1" eType="#//MenuItem" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CustomPolicy" eSuperTypes="#//ncpolicy/NewChildPolicy">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" lowerBound="1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ </eSubpackages>
</ecore:EPackage>
diff --git a/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi b/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
index 010acdc5626..27fe7796e7c 100644
--- a/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
+++ b/sandbox/org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi
@@ -1,20 +1,24 @@
<?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">
- <roots elementMultiplicity="1">
+<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:ncpolicy="http://www.eclipse.org/papyrus/newchild/policy" xmlns:newchild="http://www.eclipse.org/papyrus/newchild" name="Standard">
+ <roots name="EObject">
<constraints xsi:type="constraints:SimpleConstraint" name="isEObject">
- <constraintType href="platform:/plugin/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <constraintType href="../../../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" 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">
- <groups>
- <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 before="" after="">
+ <submenus xsi:type="ncpolicy:NewEMFChildMenu" id="" name="New child" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif" layout="auto"/>
+ <submenus xsi:type="ncpolicy:NewEMFChildMenu" name="New sibling" icon="/org.eclipse.papyrus.properties.model.edit/icons/full/obj16/Customization.gif" createIn="parent" layout="auto"/>
</groups>
</roots>
+ <newChildPolicies name="FilterNewConstraints">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isDisplayUnit">
+ <constraintType href="../../../plugin/org.eclipse.papyrus.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/constraints"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="DisplayUnit"/>
+ </constraints>
+ <policies xsi:type="ncpolicy:FilterPolicy" name="removeConstraintDescriptors">
+ <eClasses href="../../../plugin/org.eclipse.papyrus.constraints/Model/Constraints.ecore#//ConstraintDescriptor"/>
+ </policies>
+ </newChildPolicies>
</newchild:NewchildConfiguration>
diff --git a/sandbox/org.eclipse.papyrus.newchild/build.properties b/sandbox/org.eclipse.papyrus.newchild/build.properties
index 79d799f9825..2654a706d7c 100644
--- a/sandbox/org.eclipse.papyrus.newchild/build.properties
+++ b/sandbox/org.eclipse.papyrus.newchild/build.properties
@@ -5,12 +5,12 @@
# $Id$
bin.includes = .,\
- model/,\
META-INF/,\
plugin.xml,\
plugin.properties,\
Model/,\
about.html
jars.compile.order = .
-source.. = src-gen/
+source.. = src-gen/,\
+ src
output.. = bin/
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuAction.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuAction.java
index a2dd645da1a..e8f8de03c31 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuAction.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/MenuAction.java
@@ -8,6 +8,8 @@ package org.eclipse.papyrus.newchild;
import org.eclipse.papyrus.extendedtypes.ExtendedElementTypeConfiguration;
+import org.eclipse.papyrus.newchild.ncpolicy.CreateIn;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Menu Action</b></em>'.
@@ -17,7 +19,6 @@ import org.eclipse.papyrus.extendedtypes.ExtendedElementTypeConfiguration;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.papyrus.newchild.MenuAction#getElementType <em>Element Type</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.MenuAction#getPosition <em>Position</em>}</li>
* </ul>
* </p>
*
@@ -52,34 +53,4 @@ public interface MenuAction extends MenuItem {
*/
void setElementType(ExtendedElementTypeConfiguration value);
- /**
- * Returns the value of the '<em><b>Position</b></em>' attribute.
- * The default value is <code>"child"</code>.
- * The literals are from the enumeration {@link org.eclipse.papyrus.newchild.ElementPosition}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Position</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Position</em>' attribute.
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see #setPosition(ElementPosition)
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getMenuAction_Position()
- * @model default="child" required="true"
- * @generated
- */
- ElementPosition getPosition();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.newchild.MenuAction#getPosition <em>Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Position</em>' attribute.
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see #getPosition()
- * @generated
- */
- void setPosition(ElementPosition value);
-
} // MenuAction
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 617e5f07613..570ba2c6ffd 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
@@ -7,8 +7,8 @@
package org.eclipse.papyrus.newchild;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.papyrus.constraints.DisplayUnit;
+import org.eclipse.papyrus.constraints.DisplayUnit;
/**
* <!-- begin-user-doc -->
@@ -28,7 +28,6 @@ import org.eclipse.papyrus.constraints.DisplayUnit;
* @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}.
@@ -70,4 +69,5 @@ public interface MenuRoot extends MenuContainer, DisplayUnit {
* @generated
*/
void setName(String value);
+
} // MenuRoot
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 ea6289b05da..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/NewChildMenu.java
+++ /dev/null
@@ -1,88 +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 -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.NewChildMenu#getPosition <em>Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.NewChildMenu#getKind <em>Kind</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildMenu()
- * @model
- * @generated
- */
-public interface NewChildMenu extends Menu {
- /**
- * Returns the value of the '<em><b>Position</b></em>' attribute.
- * The default value is <code>"child"</code>.
- * The literals are from the enumeration {@link org.eclipse.papyrus.newchild.ElementPosition}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Position</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Position</em>' attribute.
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see #setPosition(ElementPosition)
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildMenu_Position()
- * @model default="child" required="true"
- * @generated
- */
- ElementPosition getPosition();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.newchild.NewChildMenu#getPosition <em>Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Position</em>' attribute.
- * @see org.eclipse.papyrus.newchild.ElementPosition
- * @see #getPosition()
- * @generated
- */
- void setPosition(ElementPosition value);
-
- /**
- * Returns the value of the '<em><b>Kind</b></em>' attribute.
- * The default value is <code>"hierarchical"</code>.
- * The literals are from the enumeration {@link org.eclipse.papyrus.newchild.NewChildKind}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Kind</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.papyrus.newchild.NewChildKind
- * @see #setKind(NewChildKind)
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildMenu_Kind()
- * @model default="hierarchical" required="true"
- * @generated
- */
- NewChildKind getKind();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.newchild.NewChildMenu#getKind <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.papyrus.newchild.NewChildKind
- * @see #getKind()
- * @generated
- */
- void setKind(NewChildKind value);
-
-} // NewChildMenu
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
index ce2fdbf10da..3221b11ae7e 100644
--- 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
@@ -9,6 +9,7 @@ package org.eclipse.papyrus.newchild;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
/**
* <!-- begin-user-doc -->
@@ -20,6 +21,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getRoots <em>Roots</em>}</li>
* <li>{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getNewChildPolicies <em>New Child Policies</em>}</li>
* </ul>
* </p>
*
@@ -70,4 +72,20 @@ public interface NewchildConfiguration extends EObject {
*/
void setName(String value);
+ /**
+ * Returns the value of the '<em><b>New Child Policies</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>New Child Policies</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>New Child Policies</em>' containment reference list.
+ * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewchildConfiguration_NewChildPolicies()
+ * @model containment="true"
+ * @generated
+ */
+ EList<NewChildPolicySet> getNewChildPolicies();
+
} // 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
index e9ae2c7f61c..977459890bf 100644
--- 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
@@ -62,15 +62,6 @@ public interface NewchildFactory extends EFactory {
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>Separator</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
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
index db7bbc3a4e5..bea69675727 100644
--- 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
@@ -89,13 +89,22 @@ public interface NewchildPackage extends EPackage {
int NEWCHILD_CONFIGURATION__NAME = 1;
/**
+ * The feature id for the '<em><b>New Child Policies</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES = 2;
+
+ /**
* The number of structural features of the '<em>Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int NEWCHILD_CONFIGURATION_FEATURE_COUNT = 2;
+ int NEWCHILD_CONFIGURATION_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.MenuContainerImpl <em>Menu Container</em>}' class.
@@ -301,95 +310,13 @@ public interface NewchildPackage extends EPackage {
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 feature id for the '<em><b>Position</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__POSITION = MENU_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int NEW_CHILD_MENU__KIND = MENU_FEATURE_COUNT + 1;
-
- /**
- * 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 + 2;
+ int MENU_ACTION_FEATURE_COUNT = MENU_ITEM_FEATURE_COUNT + 1;
/**
* The meta object id for the '{@link org.eclipse.papyrus.newchild.impl.SeparatorImpl <em>Separator</em>}' class.
@@ -399,7 +326,7 @@ public interface NewchildPackage extends EPackage {
* @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getSeparator()
* @generated
*/
- int SEPARATOR = 7;
+ int SEPARATOR = 6;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
@@ -427,7 +354,7 @@ public interface NewchildPackage extends EPackage {
* @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuGroup()
* @generated
*/
- int MENU_GROUP = 8;
+ int MENU_GROUP = 7;
/**
* The feature id for the '<em><b>Submenus</b></em>' containment reference list.
@@ -482,7 +409,7 @@ public interface NewchildPackage extends EPackage {
* @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getCustomFiller()
* @generated
*/
- int CUSTOM_FILLER = 9;
+ int CUSTOM_FILLER = 8;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
@@ -512,16 +439,6 @@ public interface NewchildPackage extends EPackage {
int CUSTOM_FILLER_FEATURE_COUNT = MENU_ITEM_FEATURE_COUNT + 1;
/**
- * 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 -->
@@ -529,17 +446,7 @@ public interface NewchildPackage extends EPackage {
* @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getMenuPosition()
* @generated
*/
- int MENU_POSITION = 11;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.newchild.NewChildKind <em>New Child Kind</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.NewChildKind
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewChildKind()
- * @generated
- */
- int NEW_CHILD_KIND = 12;
+ int MENU_POSITION = 9;
/**
@@ -575,6 +482,17 @@ public interface NewchildPackage extends EPackage {
EAttribute getNewchildConfiguration_Name();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.NewchildConfiguration#getNewChildPolicies <em>New Child Policies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>New Child Policies</em>'.
+ * @see org.eclipse.papyrus.newchild.NewchildConfiguration#getNewChildPolicies()
+ * @see #getNewchildConfiguration()
+ * @generated
+ */
+ EReference getNewchildConfiguration_NewChildPolicies();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.newchild.MenuRoot <em>Menu Root</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -702,49 +620,6 @@ public interface NewchildPackage extends EPackage {
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 the attribute '{@link org.eclipse.papyrus.newchild.NewChildMenu#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.NewChildMenu#getPosition()
- * @see #getNewChildMenu()
- * @generated
- */
- EAttribute getNewChildMenu_Position();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.NewChildMenu#getKind <em>Kind</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Kind</em>'.
- * @see org.eclipse.papyrus.newchild.NewChildMenu#getKind()
- * @see #getNewChildMenu()
- * @generated
- */
- EAttribute getNewChildMenu_Kind();
-
- /**
* Returns the meta object for class '{@link org.eclipse.papyrus.newchild.Separator <em>Separator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -819,16 +694,6 @@ public interface NewchildPackage extends EPackage {
EAttribute getCustomFiller_ClassName();
/**
- * 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 -->
@@ -839,16 +704,6 @@ public interface NewchildPackage extends EPackage {
EEnum getMenuPosition();
/**
- * Returns the meta object for enum '{@link org.eclipse.papyrus.newchild.NewChildKind <em>New Child Kind</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>New Child Kind</em>'.
- * @see org.eclipse.papyrus.newchild.NewChildKind
- * @generated
- */
- EEnum getNewChildKind();
-
- /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -897,6 +752,14 @@ public interface NewchildPackage extends EPackage {
EAttribute NEWCHILD_CONFIGURATION__NAME = eINSTANCE.getNewchildConfiguration_Name();
/**
+ * The meta object literal for the '<em><b>New Child Policies</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES = eINSTANCE.getNewchildConfiguration_NewChildPolicies();
+
+ /**
* The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.MenuRootImpl <em>Menu Root</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1003,40 +866,6 @@ public interface NewchildPackage extends EPackage {
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 '<em><b>Position</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute NEW_CHILD_MENU__POSITION = eINSTANCE.getNewChildMenu_Position();
-
- /**
- * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute NEW_CHILD_MENU__KIND = eINSTANCE.getNewChildMenu_Kind();
-
- /**
* The meta object literal for the '{@link org.eclipse.papyrus.newchild.impl.SeparatorImpl <em>Separator</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1099,16 +928,6 @@ public interface NewchildPackage extends EPackage {
EAttribute CUSTOM_FILLER__CLASS_NAME = eINSTANCE.getCustomFiller_ClassName();
/**
- * 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 -->
@@ -1118,16 +937,6 @@ public interface NewchildPackage extends EPackage {
*/
EEnum MENU_POSITION = eINSTANCE.getMenuPosition();
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.newchild.NewChildKind <em>New Child Kind</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.NewChildKind
- * @see org.eclipse.papyrus.newchild.impl.NewchildPackageImpl#getNewChildKind()
- * @generated
- */
- EEnum NEW_CHILD_KIND = eINSTANCE.getNewChildKind();
-
}
} //NewchildPackage
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
index 833a423b34b..6aee3f15c17 100644
--- 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
@@ -15,10 +15,11 @@ 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;
+import org.eclipse.papyrus.newchild.ncpolicy.CreateIn;
+
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Menu Action</b></em>'.
@@ -27,7 +28,6 @@ import org.eclipse.papyrus.newchild.NewchildPackage;
* 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>
*
@@ -45,26 +45,6 @@ public class MenuActionImpl extends MenuItemImpl implements MenuAction {
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
@@ -126,35 +106,12 @@ public class MenuActionImpl extends MenuItemImpl implements MenuAction {
* <!-- 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);
}
@@ -170,9 +127,6 @@ public class MenuActionImpl extends MenuItemImpl implements MenuAction {
case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
setElementType((ExtendedElementTypeConfiguration)newValue);
return;
- case NewchildPackage.MENU_ACTION__POSITION:
- setPosition((ElementPosition)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -188,9 +142,6 @@ public class MenuActionImpl extends MenuItemImpl implements MenuAction {
case NewchildPackage.MENU_ACTION__ELEMENT_TYPE:
setElementType((ExtendedElementTypeConfiguration)null);
return;
- case NewchildPackage.MENU_ACTION__POSITION:
- setPosition(POSITION_EDEFAULT);
- return;
}
super.eUnset(featureID);
}
@@ -205,26 +156,8 @@ public class MenuActionImpl extends MenuItemImpl implements MenuAction {
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/MenuRootImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/MenuRootImpl.java
index 0a04b6f3a0c..7f299ab723f 100644
--- 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
@@ -65,7 +65,7 @@ public class MenuRootImpl extends MenuContainerImpl implements MenuRoot {
* @generated
* @ordered
*/
- protected static final int ELEMENT_MULTIPLICITY_EDEFAULT = 0;
+ protected static final int ELEMENT_MULTIPLICITY_EDEFAULT = 1;
/**
* The cached value of the '{@link #getElementMultiplicity() <em>Element Multiplicity</em>}' attribute.
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 76f5513aa52..00000000000
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/impl/NewChildMenuImpl.java
+++ /dev/null
@@ -1,222 +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.ElementPosition;
-import org.eclipse.papyrus.newchild.NewChildKind;
-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>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.newchild.impl.NewChildMenuImpl#getPosition <em>Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.newchild.impl.NewChildMenuImpl#getKind <em>Kind</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class NewChildMenuImpl extends MenuImpl implements NewChildMenu {
- /**
- * 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;
-
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final NewChildKind KIND_EDEFAULT = NewChildKind.HIERARCHICAL;
-
- /**
- * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected NewChildKind kind = KIND_EDEFAULT;
-
- /**
- * <!-- 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;
- }
-
- /**
- * <!-- 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.NEW_CHILD_MENU__POSITION, oldPosition, position));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NewChildKind getKind() {
- return kind;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setKind(NewChildKind newKind) {
- NewChildKind oldKind = kind;
- kind = newKind == null ? KIND_EDEFAULT : newKind;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NewchildPackage.NEW_CHILD_MENU__KIND, oldKind, kind));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case NewchildPackage.NEW_CHILD_MENU__POSITION:
- return getPosition();
- case NewchildPackage.NEW_CHILD_MENU__KIND:
- return getKind();
- }
- 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.NEW_CHILD_MENU__POSITION:
- setPosition((ElementPosition)newValue);
- return;
- case NewchildPackage.NEW_CHILD_MENU__KIND:
- setKind((NewChildKind)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NewchildPackage.NEW_CHILD_MENU__POSITION:
- setPosition(POSITION_EDEFAULT);
- return;
- case NewchildPackage.NEW_CHILD_MENU__KIND:
- setKind(KIND_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NewchildPackage.NEW_CHILD_MENU__POSITION:
- return position != POSITION_EDEFAULT;
- case NewchildPackage.NEW_CHILD_MENU__KIND:
- return kind != KIND_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(", kind: ");
- result.append(kind);
- result.append(')');
- return result.toString();
- }
-
-} //NewChildMenuImpl
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
index 99597941e77..a197aa92bf9 100644
--- 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
@@ -25,6 +25,7 @@ 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;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
/**
* <!-- begin-user-doc -->
@@ -35,6 +36,7 @@ import org.eclipse.papyrus.newchild.NewchildPackage;
* <ul>
* <li>{@link org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl#getRoots <em>Roots</em>}</li>
* <li>{@link org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.impl.NewchildConfigurationImpl#getNewChildPolicies <em>New Child Policies</em>}</li>
* </ul>
* </p>
*
@@ -60,6 +62,7 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
+
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
@@ -71,6 +74,16 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
protected String name = NAME_EDEFAULT;
/**
+ * The cached value of the '{@link #getNewChildPolicies() <em>New Child Policies</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNewChildPolicies()
+ * @generated
+ * @ordered
+ */
+ protected EList<NewChildPolicySet> newChildPolicies;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -127,11 +140,25 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
* <!-- end-user-doc -->
* @generated
*/
+ public EList<NewChildPolicySet> getNewChildPolicies() {
+ if (newChildPolicies == null) {
+ newChildPolicies = new EObjectContainmentEList<NewChildPolicySet>(NewChildPolicySet.class, this, NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES);
+ }
+ return newChildPolicies;
+ }
+
+ /**
+ * <!-- 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);
+ case NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES:
+ return ((InternalEList<?>)getNewChildPolicies()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -148,6 +175,8 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
return getRoots();
case NewchildPackage.NEWCHILD_CONFIGURATION__NAME:
return getName();
+ case NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES:
+ return getNewChildPolicies();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -168,6 +197,10 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
case NewchildPackage.NEWCHILD_CONFIGURATION__NAME:
setName((String)newValue);
return;
+ case NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES:
+ getNewChildPolicies().clear();
+ getNewChildPolicies().addAll((Collection<? extends NewChildPolicySet>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -186,6 +219,9 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
case NewchildPackage.NEWCHILD_CONFIGURATION__NAME:
setName(NAME_EDEFAULT);
return;
+ case NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES:
+ getNewChildPolicies().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -202,6 +238,8 @@ public class NewchildConfigurationImpl extends EObjectImpl implements NewchildCo
return roots != null && !roots.isEmpty();
case NewchildPackage.NEWCHILD_CONFIGURATION__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case NewchildPackage.NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES:
+ return newChildPolicies != null && !newChildPolicies.isEmpty();
}
return super.eIsSet(featureID);
}
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
index de52ef1523e..91aae0ae785 100644
--- 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
@@ -65,7 +65,6 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
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.SEPARATOR: return createSeparator();
case NewchildPackage.MENU_GROUP: return createMenuGroup();
case NewchildPackage.CUSTOM_FILLER: return createCustomFiller();
@@ -82,12 +81,8 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
@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);
- case NewchildPackage.NEW_CHILD_KIND:
- return createNewChildKindFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -101,12 +96,8 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
@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);
- case NewchildPackage.NEW_CHILD_KIND:
- return convertNewChildKindToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -157,16 +148,6 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
* <!-- end-user-doc -->
* @generated
*/
- public NewChildMenu createNewChildMenu() {
- NewChildMenuImpl newChildMenu = new NewChildMenuImpl();
- return newChildMenu;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public Separator createSeparator() {
SeparatorImpl separator = new SeparatorImpl();
return separator;
@@ -197,26 +178,6 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
* <!-- 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() + "'");
@@ -237,26 +198,6 @@ public class NewchildFactoryImpl extends EFactoryImpl implements NewchildFactory
* <!-- end-user-doc -->
* @generated
*/
- public NewChildKind createNewChildKindFromString(EDataType eDataType, String initialValue) {
- NewChildKind result = NewChildKind.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 convertNewChildKindToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public NewchildPackage getNewchildPackage() {
return (NewchildPackage)getEPackage();
}
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
index 0c7515d04ac..9b028ff3e6c 100644
--- 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
@@ -20,7 +20,6 @@ import org.eclipse.papyrus.constraints.ConstraintsPackage;
import org.eclipse.papyrus.extendedtypes.ExtendedtypesPackage;
import org.eclipse.papyrus.newchild.CustomFiller;
-import org.eclipse.papyrus.newchild.ElementPosition;
import org.eclipse.papyrus.newchild.Menu;
import org.eclipse.papyrus.newchild.MenuAction;
import org.eclipse.papyrus.newchild.MenuContainer;
@@ -28,13 +27,15 @@ 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.NewChildKind;
-import org.eclipse.papyrus.newchild.NewChildMenu;
import org.eclipse.papyrus.newchild.NewchildConfiguration;
import org.eclipse.papyrus.newchild.NewchildFactory;
import org.eclipse.papyrus.newchild.NewchildPackage;
import org.eclipse.papyrus.newchild.Separator;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+
+import org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl;
+
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
@@ -89,13 +90,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- end-user-doc -->
* @generated
*/
- private EClass newChildMenuEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
private EClass separatorEClass = null;
/**
@@ -117,23 +111,9 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- end-user-doc -->
* @generated
*/
- private EEnum elementPositionEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
private EEnum menuPositionEEnum = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum newChildKindEEnum = 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.
@@ -183,11 +163,16 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
ConstraintsPackage.eINSTANCE.eClass();
ExtendedtypesPackage.eINSTANCE.eClass();
+ // Obtain or create and register interdependencies
+ NcpolicyPackageImpl theNcpolicyPackage = (NcpolicyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NcpolicyPackage.eNS_URI) instanceof NcpolicyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NcpolicyPackage.eNS_URI) : NcpolicyPackage.eINSTANCE);
+
// Create package meta-data objects
theNewchildPackage.createPackageContents();
+ theNcpolicyPackage.createPackageContents();
// Initialize created meta-data
theNewchildPackage.initializePackageContents();
+ theNcpolicyPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theNewchildPackage.freeze();
@@ -230,6 +215,15 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getNewchildConfiguration_NewChildPolicies() {
+ return (EReference)newchildConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getMenuRoot() {
return menuRootEClass;
}
@@ -338,42 +332,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- 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 EAttribute getNewChildMenu_Position() {
- return (EAttribute)newChildMenuEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getNewChildMenu_Kind() {
- return (EAttribute)newChildMenuEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getSeparator() {
return separatorEClass;
}
@@ -437,15 +395,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- end-user-doc -->
* @generated
*/
- public EEnum getElementPosition() {
- return elementPositionEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EEnum getMenuPosition() {
return menuPositionEEnum;
}
@@ -455,15 +404,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
* <!-- end-user-doc -->
* @generated
*/
- public EEnum getNewChildKind() {
- return newChildKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public NewchildFactory getNewchildFactory() {
return (NewchildFactory)getEFactoryInstance();
}
@@ -490,6 +430,7 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
newchildConfigurationEClass = createEClass(NEWCHILD_CONFIGURATION);
createEReference(newchildConfigurationEClass, NEWCHILD_CONFIGURATION__ROOTS);
createEAttribute(newchildConfigurationEClass, NEWCHILD_CONFIGURATION__NAME);
+ createEReference(newchildConfigurationEClass, NEWCHILD_CONFIGURATION__NEW_CHILD_POLICIES);
menuRootEClass = createEClass(MENU_ROOT);
createEReference(menuRootEClass, MENU_ROOT__GROUPS);
@@ -507,11 +448,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
menuActionEClass = createEClass(MENU_ACTION);
createEReference(menuActionEClass, MENU_ACTION__ELEMENT_TYPE);
- createEAttribute(menuActionEClass, MENU_ACTION__POSITION);
-
- newChildMenuEClass = createEClass(NEW_CHILD_MENU);
- createEAttribute(newChildMenuEClass, NEW_CHILD_MENU__POSITION);
- createEAttribute(newChildMenuEClass, NEW_CHILD_MENU__KIND);
separatorEClass = createEClass(SEPARATOR);
@@ -524,9 +460,7 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
createEAttribute(customFillerEClass, CUSTOM_FILLER__CLASS_NAME);
// Create enums
- elementPositionEEnum = createEEnum(ELEMENT_POSITION);
menuPositionEEnum = createEEnum(MENU_POSITION);
- newChildKindEEnum = createEEnum(NEW_CHILD_KIND);
}
/**
@@ -553,10 +487,14 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
setNsURI(eNS_URI);
// Obtain other dependent packages
+ NcpolicyPackage theNcpolicyPackage = (NcpolicyPackage)EPackage.Registry.INSTANCE.getEPackage(NcpolicyPackage.eNS_URI);
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
ConstraintsPackage theConstraintsPackage = (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI);
+ // Add subpackages
+ getESubpackages().add(theNcpolicyPackage);
+
// Create type parameters
// Set bounds for type parameters
@@ -567,7 +505,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
menuEClass.getESuperTypes().add(this.getMenuContainer());
menuEClass.getESuperTypes().add(this.getMenuItem());
menuActionEClass.getESuperTypes().add(this.getMenuItem());
- newChildMenuEClass.getESuperTypes().add(this.getMenu());
separatorEClass.getESuperTypes().add(this.getMenuItem());
menuGroupEClass.getESuperTypes().add(this.getMenuContainer());
customFillerEClass.getESuperTypes().add(this.getMenuItem());
@@ -576,6 +513,7 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
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);
initEAttribute(getNewchildConfiguration_Name(), theEcorePackage.getEString(), "name", null, 1, 1, NewchildConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNewchildConfiguration_NewChildPolicies(), theNcpolicyPackage.getNewChildPolicySet(), null, "newChildPolicies", 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);
@@ -593,11 +531,6 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
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);
- initEAttribute(getNewChildMenu_Position(), this.getElementPosition(), "position", "child", 1, 1, NewChildMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getNewChildMenu_Kind(), this.getNewChildKind(), "kind", "hierarchical", 1, 1, NewChildMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(separatorEClass, Separator.class, "Separator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -610,19 +543,10 @@ public class NewchildPackageImpl extends EPackageImpl implements NewchildPackage
initEAttribute(getCustomFiller_ClassName(), theEcorePackage.getEString(), "className", null, 1, 1, CustomFiller.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);
- initEEnum(newChildKindEEnum, NewChildKind.class, "NewChildKind");
- addEEnumLiteral(newChildKindEEnum, NewChildKind.HIERARCHICAL);
- addEEnumLiteral(newChildKindEEnum, NewChildKind.FLAT);
- addEEnumLiteral(newChildKindEEnum, NewChildKind.AUTO);
-
// Create resource
createResource(eNS_URI);
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ElementPosition.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CreateIn.java
index ac2c27dfca0..95f62108c08 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ElementPosition.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CreateIn.java
@@ -4,7 +4,7 @@
*
* $Id$
*/
-package org.eclipse.papyrus.newchild;
+package org.eclipse.papyrus.newchild.ncpolicy;
import java.util.Arrays;
import java.util.Collections;
@@ -14,93 +14,93 @@ import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Element Position</b></em>',
+ * A representation of the literals of the enumeration '<em><b>Create In</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getElementPosition()
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getCreateIn()
* @model
* @generated
*/
-public enum ElementPosition implements Enumerator {
+public enum CreateIn implements Enumerator {
/**
- * The '<em><b>Child</b></em>' literal object.
+ * The '<em><b>Self</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #CHILD_VALUE
+ * @see #SELF_VALUE
* @generated
* @ordered
*/
- CHILD(0, "child", "child"),
+ SELF(0, "self", "self"),
/**
- * The '<em><b>Sibling</b></em>' literal object.
+ * The '<em><b>Parent</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #SIBLING_VALUE
+ * @see #PARENT_VALUE
* @generated
* @ordered
*/
- SIBLING(1, "sibling", "sibling");
+ PARENT(1, "parent", "parent");
/**
- * The '<em><b>Child</b></em>' literal value.
+ * The '<em><b>Self</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Child</b></em>' literal object isn't clear,
+ * If the meaning of '<em><b>Self</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @see #CHILD
- * @model name="child"
+ * @see #SELF
+ * @model name="self"
* @generated
* @ordered
*/
- public static final int CHILD_VALUE = 0;
+ public static final int SELF_VALUE = 0;
/**
- * The '<em><b>Sibling</b></em>' literal value.
+ * The '<em><b>Parent</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Sibling</b></em>' literal object isn't clear,
+ * If the meaning of '<em><b>Parent</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @see #SIBLING
- * @model name="sibling"
+ * @see #PARENT
+ * @model name="parent"
* @generated
* @ordered
*/
- public static final int SIBLING_VALUE = 1;
+ public static final int PARENT_VALUE = 1;
/**
- * An array of all the '<em><b>Element Position</b></em>' enumerators.
+ * An array of all the '<em><b>Create In</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- private static final ElementPosition[] VALUES_ARRAY =
- new ElementPosition[] {
- CHILD,
- SIBLING,
+ private static final CreateIn[] VALUES_ARRAY =
+ new CreateIn[] {
+ SELF,
+ PARENT,
};
/**
- * A public read-only list of all the '<em><b>Element Position</b></em>' enumerators.
+ * A public read-only list of all the '<em><b>Create In</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final List<ElementPosition> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+ public static final List<CreateIn> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
- * Returns the '<em><b>Element Position</b></em>' literal with the specified literal value.
+ * Returns the '<em><b>Create In</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static ElementPosition get(String literal) {
+ public static CreateIn get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- ElementPosition result = VALUES_ARRAY[i];
+ CreateIn result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
@@ -109,14 +109,14 @@ public enum ElementPosition implements Enumerator {
}
/**
- * Returns the '<em><b>Element Position</b></em>' literal with the specified name.
+ * Returns the '<em><b>Create In</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static ElementPosition getByName(String name) {
+ public static CreateIn getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- ElementPosition result = VALUES_ARRAY[i];
+ CreateIn result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
@@ -125,15 +125,15 @@ public enum ElementPosition implements Enumerator {
}
/**
- * Returns the '<em><b>Element Position</b></em>' literal with the specified integer value.
+ * Returns the '<em><b>Create In</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static ElementPosition get(int value) {
+ public static CreateIn get(int value) {
switch (value) {
- case CHILD_VALUE: return CHILD;
- case SIBLING_VALUE: return SIBLING;
+ case SELF_VALUE: return SELF;
+ case PARENT_VALUE: return PARENT;
}
return null;
}
@@ -165,7 +165,7 @@ public enum ElementPosition implements Enumerator {
* <!-- end-user-doc -->
* @generated
*/
- private ElementPosition(int value, String name, String literal) {
+ private CreateIn(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
@@ -209,4 +209,4 @@ public enum ElementPosition implements Enumerator {
return literal;
}
-} //ElementPosition
+} //CreateIn
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CustomPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CustomPolicy.java
new file mode 100644
index 00000000000..d9a46103725
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/CustomPolicy.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Custom Policy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getCustomPolicy()
+ * @model
+ * @generated
+ */
+public interface CustomPolicy extends NewChildPolicy {
+ /**
+ * 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.ncpolicy.NcpolicyPackage#getCustomPolicy_ClassName()
+ * @model required="true"
+ * @generated
+ */
+ String getClassName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy#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);
+
+} // CustomPolicy
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/FilterPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/FilterPolicy.java
new file mode 100644
index 00000000000..ef7aafd01ba
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/FilterPolicy.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Filter Policy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getFilterPolicy()
+ * @model
+ * @generated
+ */
+public interface FilterPolicy extends NewChildPolicy {
+} // FilterPolicy
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/ncpolicy/Layout.java
index ce09dc91446..95047a2e170 100644
--- 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/ncpolicy/Layout.java
@@ -4,7 +4,7 @@
*
* $Id$
*/
-package org.eclipse.papyrus.newchild;
+package org.eclipse.papyrus.newchild.ncpolicy;
import java.util.Arrays;
import java.util.Collections;
@@ -14,14 +14,14 @@ 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>',
+ * A representation of the literals of the enumeration '<em><b>Layout</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
- * @see org.eclipse.papyrus.newchild.NewchildPackage#getNewChildKind()
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getLayout()
* @model
* @generated
*/
-public enum NewChildKind implements Enumerator {
+public enum Layout implements Enumerator {
/**
* The '<em><b>Hierarchical</b></em>' literal object.
* <!-- begin-user-doc -->
@@ -98,35 +98,35 @@ public enum NewChildKind implements Enumerator {
public static final int AUTO_VALUE = 2;
/**
- * An array of all the '<em><b>New Child Kind</b></em>' enumerators.
+ * An array of all the '<em><b>Layout</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- private static final NewChildKind[] VALUES_ARRAY =
- new NewChildKind[] {
+ private static final Layout[] VALUES_ARRAY =
+ new Layout[] {
HIERARCHICAL,
FLAT,
AUTO,
};
/**
- * A public read-only list of all the '<em><b>New Child Kind</b></em>' enumerators.
+ * A public read-only list of all the '<em><b>Layout</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final List<NewChildKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+ public static final List<Layout> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
- * Returns the '<em><b>New Child Kind</b></em>' literal with the specified literal value.
+ * Returns the '<em><b>Layout</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static NewChildKind get(String literal) {
+ public static Layout get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- NewChildKind result = VALUES_ARRAY[i];
+ Layout result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
@@ -135,14 +135,14 @@ public enum NewChildKind implements Enumerator {
}
/**
- * Returns the '<em><b>New Child Kind</b></em>' literal with the specified name.
+ * Returns the '<em><b>Layout</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static NewChildKind getByName(String name) {
+ public static Layout getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- NewChildKind result = VALUES_ARRAY[i];
+ Layout result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
@@ -151,12 +151,12 @@ public enum NewChildKind implements Enumerator {
}
/**
- * Returns the '<em><b>New Child Kind</b></em>' literal with the specified integer value.
+ * Returns the '<em><b>Layout</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static NewChildKind get(int value) {
+ public static Layout get(int value) {
switch (value) {
case HIERARCHICAL_VALUE: return HIERARCHICAL;
case FLAT_VALUE: return FLAT;
@@ -192,7 +192,7 @@ public enum NewChildKind implements Enumerator {
* <!-- end-user-doc -->
* @generated
*/
- private NewChildKind(int value, String name, String literal) {
+ private Layout(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
@@ -236,4 +236,4 @@ public enum NewChildKind implements Enumerator {
return literal;
}
-} //NewChildKind
+} //Layout
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyFactory.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyFactory.java
new file mode 100644
index 00000000000..7f341ca2520
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyFactory.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+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.ncpolicy.NcpolicyPackage
+ * @generated
+ */
+public interface NcpolicyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ NcpolicyFactory eINSTANCE = org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>New EMF Child Menu</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>New EMF Child Menu</em>'.
+ * @generated
+ */
+ NewEMFChildMenu createNewEMFChildMenu();
+
+ /**
+ * Returns a new object of class '<em>New Child Policy Set</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>New Child Policy Set</em>'.
+ * @generated
+ */
+ NewChildPolicySet createNewChildPolicySet();
+
+ /**
+ * Returns a new object of class '<em>Filter Policy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Filter Policy</em>'.
+ * @generated
+ */
+ FilterPolicy createFilterPolicy();
+
+ /**
+ * Returns a new object of class '<em>Replace Policy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Replace Policy</em>'.
+ * @generated
+ */
+ ReplacePolicy createReplacePolicy();
+
+ /**
+ * Returns a new object of class '<em>Custom Policy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Custom Policy</em>'.
+ * @generated
+ */
+ CustomPolicy createCustomPolicy();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ NcpolicyPackage getNcpolicyPackage();
+
+} //NcpolicyFactory
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyPackage.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyPackage.java
new file mode 100644
index 00000000000..c40dd4be65c
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NcpolicyPackage.java
@@ -0,0 +1,801 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+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.papyrus.constraints.ConstraintsPackage;
+
+import org.eclipse.papyrus.newchild.NewchildPackage;
+
+/**
+ * <!-- 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.ncpolicy.NcpolicyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface NcpolicyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "ncpolicy";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/newchild/policy";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "ncpolicy";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ NcpolicyPackage eINSTANCE = org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl <em>New EMF Child Menu</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewEMFChildMenu()
+ * @generated
+ */
+ int NEW_EMF_CHILD_MENU = 0;
+
+ /**
+ * The feature id for the '<em><b>Submenus</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__SUBMENUS = NewchildPackage.MENU__SUBMENUS;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__ID = NewchildPackage.MENU__ID;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__NAME = NewchildPackage.MENU__NAME;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__ICON = NewchildPackage.MENU__ICON;
+
+ /**
+ * The feature id for the '<em><b>Create In</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__CREATE_IN = NewchildPackage.MENU_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Layout</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU__LAYOUT = NewchildPackage.MENU_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 NEW_EMF_CHILD_MENU__GROUPS = NewchildPackage.MENU_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>New EMF Child Menu</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_EMF_CHILD_MENU_FEATURE_COUNT = NewchildPackage.MENU_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl <em>New Child Policy Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewChildPolicySet()
+ * @generated
+ */
+ int NEW_CHILD_POLICY_SET = 1;
+
+ /**
+ * The feature id for the '<em><b>Constraints</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_SET__CONSTRAINTS = ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS;
+
+ /**
+ * The feature id for the '<em><b>Element Multiplicity</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_SET__ELEMENT_MULTIPLICITY = ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_SET__NAME = ConstraintsPackage.DISPLAY_UNIT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Policies</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_SET__POLICIES = ConstraintsPackage.DISPLAY_UNIT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>New Child Policy Set</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_SET_FEATURE_COUNT = ConstraintsPackage.DISPLAY_UNIT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl <em>New Child Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewChildPolicy()
+ * @generated
+ */
+ int NEW_CHILD_POLICY = 2;
+
+ /**
+ * The feature id for the '<em><b>Roles</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY__ROLES = 0;
+
+ /**
+ * The feature id for the '<em><b>EClasses</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY__ECLASSES = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY__NAME = 2;
+
+ /**
+ * The number of structural features of the '<em>New Child Policy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NEW_CHILD_POLICY_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.FilterPolicyImpl <em>Filter Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.FilterPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getFilterPolicy()
+ * @generated
+ */
+ int FILTER_POLICY = 3;
+
+ /**
+ * The feature id for the '<em><b>Roles</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER_POLICY__ROLES = NEW_CHILD_POLICY__ROLES;
+
+ /**
+ * The feature id for the '<em><b>EClasses</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER_POLICY__ECLASSES = NEW_CHILD_POLICY__ECLASSES;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER_POLICY__NAME = NEW_CHILD_POLICY__NAME;
+
+ /**
+ * The number of structural features of the '<em>Filter Policy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER_POLICY_FEATURE_COUNT = NEW_CHILD_POLICY_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.ReplacePolicyImpl <em>Replace Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.ReplacePolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getReplacePolicy()
+ * @generated
+ */
+ int REPLACE_POLICY = 4;
+
+ /**
+ * The feature id for the '<em><b>Roles</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int REPLACE_POLICY__ROLES = NEW_CHILD_POLICY__ROLES;
+
+ /**
+ * The feature id for the '<em><b>EClasses</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int REPLACE_POLICY__ECLASSES = NEW_CHILD_POLICY__ECLASSES;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int REPLACE_POLICY__NAME = NEW_CHILD_POLICY__NAME;
+
+ /**
+ * The feature id for the '<em><b>Replace With</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int REPLACE_POLICY__REPLACE_WITH = NEW_CHILD_POLICY_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Replace Policy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int REPLACE_POLICY_FEATURE_COUNT = NEW_CHILD_POLICY_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.CustomPolicyImpl <em>Custom Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.CustomPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getCustomPolicy()
+ * @generated
+ */
+ int CUSTOM_POLICY = 5;
+
+ /**
+ * The feature id for the '<em><b>Roles</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_POLICY__ROLES = NEW_CHILD_POLICY__ROLES;
+
+ /**
+ * The feature id for the '<em><b>EClasses</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_POLICY__ECLASSES = NEW_CHILD_POLICY__ECLASSES;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_POLICY__NAME = NEW_CHILD_POLICY__NAME;
+
+ /**
+ * The feature id for the '<em><b>Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_POLICY__CLASS_NAME = NEW_CHILD_POLICY_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Custom Policy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_POLICY_FEATURE_COUNT = NEW_CHILD_POLICY_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.CreateIn <em>Create In</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CreateIn
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getCreateIn()
+ * @generated
+ */
+ int CREATE_IN = 6;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.newchild.ncpolicy.Layout <em>Layout</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.Layout
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getLayout()
+ * @generated
+ */
+ int LAYOUT = 7;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu <em>New EMF Child Menu</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>New EMF Child Menu</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu
+ * @generated
+ */
+ EClass getNewEMFChildMenu();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getCreateIn <em>Create In</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Create In</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getCreateIn()
+ * @see #getNewEMFChildMenu()
+ * @generated
+ */
+ EAttribute getNewEMFChildMenu_CreateIn();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getLayout <em>Layout</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Layout</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getLayout()
+ * @see #getNewEMFChildMenu()
+ * @generated
+ */
+ EAttribute getNewEMFChildMenu_Layout();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#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.ncpolicy.NewEMFChildMenu#getGroups()
+ * @see #getNewEMFChildMenu()
+ * @generated
+ */
+ EReference getNewEMFChildMenu_Groups();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet <em>New Child Policy Set</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>New Child Policy Set</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet
+ * @generated
+ */
+ EClass getNewChildPolicySet();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#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.ncpolicy.NewChildPolicySet#getName()
+ * @see #getNewChildPolicySet()
+ * @generated
+ */
+ EAttribute getNewChildPolicySet_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#getPolicies <em>Policies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Policies</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#getPolicies()
+ * @see #getNewChildPolicySet()
+ * @generated
+ */
+ EReference getNewChildPolicySet_Policies();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy <em>New Child Policy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>New Child Policy</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy
+ * @generated
+ */
+ EClass getNewChildPolicy();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getRoles <em>Roles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Roles</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getRoles()
+ * @see #getNewChildPolicy()
+ * @generated
+ */
+ EAttribute getNewChildPolicy_Roles();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getEClasses <em>EClasses</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>EClasses</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getEClasses()
+ * @see #getNewChildPolicy()
+ * @generated
+ */
+ EReference getNewChildPolicy_EClasses();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#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.ncpolicy.NewChildPolicy#getName()
+ * @see #getNewChildPolicy()
+ * @generated
+ */
+ EAttribute getNewChildPolicy_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy <em>Filter Policy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Filter Policy</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy
+ * @generated
+ */
+ EClass getFilterPolicy();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy <em>Replace Policy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Replace Policy</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy
+ * @generated
+ */
+ EClass getReplacePolicy();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy#getReplaceWith <em>Replace With</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Replace With</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy#getReplaceWith()
+ * @see #getReplacePolicy()
+ * @generated
+ */
+ EReference getReplacePolicy_ReplaceWith();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy <em>Custom Policy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Custom Policy</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy
+ * @generated
+ */
+ EClass getCustomPolicy();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy#getClassName <em>Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Class Name</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy#getClassName()
+ * @see #getCustomPolicy()
+ * @generated
+ */
+ EAttribute getCustomPolicy_ClassName();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.newchild.ncpolicy.CreateIn <em>Create In</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Create In</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CreateIn
+ * @generated
+ */
+ EEnum getCreateIn();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.newchild.ncpolicy.Layout <em>Layout</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Layout</em>'.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.Layout
+ * @generated
+ */
+ EEnum getLayout();
+
+ /**
+ * 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
+ */
+ NcpolicyFactory getNcpolicyFactory();
+
+ /**
+ * <!-- 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.ncpolicy.impl.NewEMFChildMenuImpl <em>New EMF Child Menu</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewEMFChildMenu()
+ * @generated
+ */
+ EClass NEW_EMF_CHILD_MENU = eINSTANCE.getNewEMFChildMenu();
+
+ /**
+ * The meta object literal for the '<em><b>Create In</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NEW_EMF_CHILD_MENU__CREATE_IN = eINSTANCE.getNewEMFChildMenu_CreateIn();
+
+ /**
+ * The meta object literal for the '<em><b>Layout</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NEW_EMF_CHILD_MENU__LAYOUT = eINSTANCE.getNewEMFChildMenu_Layout();
+
+ /**
+ * The meta object literal for the '<em><b>Groups</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NEW_EMF_CHILD_MENU__GROUPS = eINSTANCE.getNewEMFChildMenu_Groups();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl <em>New Child Policy Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewChildPolicySet()
+ * @generated
+ */
+ EClass NEW_CHILD_POLICY_SET = eINSTANCE.getNewChildPolicySet();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NEW_CHILD_POLICY_SET__NAME = eINSTANCE.getNewChildPolicySet_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Policies</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NEW_CHILD_POLICY_SET__POLICIES = eINSTANCE.getNewChildPolicySet_Policies();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl <em>New Child Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getNewChildPolicy()
+ * @generated
+ */
+ EClass NEW_CHILD_POLICY = eINSTANCE.getNewChildPolicy();
+
+ /**
+ * The meta object literal for the '<em><b>Roles</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NEW_CHILD_POLICY__ROLES = eINSTANCE.getNewChildPolicy_Roles();
+
+ /**
+ * The meta object literal for the '<em><b>EClasses</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NEW_CHILD_POLICY__ECLASSES = eINSTANCE.getNewChildPolicy_EClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NEW_CHILD_POLICY__NAME = eINSTANCE.getNewChildPolicy_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.FilterPolicyImpl <em>Filter Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.FilterPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getFilterPolicy()
+ * @generated
+ */
+ EClass FILTER_POLICY = eINSTANCE.getFilterPolicy();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.ReplacePolicyImpl <em>Replace Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.ReplacePolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getReplacePolicy()
+ * @generated
+ */
+ EClass REPLACE_POLICY = eINSTANCE.getReplacePolicy();
+
+ /**
+ * The meta object literal for the '<em><b>Replace With</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference REPLACE_POLICY__REPLACE_WITH = eINSTANCE.getReplacePolicy_ReplaceWith();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.impl.CustomPolicyImpl <em>Custom Policy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.CustomPolicyImpl
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getCustomPolicy()
+ * @generated
+ */
+ EClass CUSTOM_POLICY = eINSTANCE.getCustomPolicy();
+
+ /**
+ * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CUSTOM_POLICY__CLASS_NAME = eINSTANCE.getCustomPolicy_ClassName();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.CreateIn <em>Create In</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CreateIn
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getCreateIn()
+ * @generated
+ */
+ EEnum CREATE_IN = eINSTANCE.getCreateIn();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.newchild.ncpolicy.Layout <em>Layout</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.newchild.ncpolicy.Layout
+ * @see org.eclipse.papyrus.newchild.ncpolicy.impl.NcpolicyPackageImpl#getLayout()
+ * @generated
+ */
+ EEnum LAYOUT = eINSTANCE.getLayout();
+
+ }
+
+} //NcpolicyPackage
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicy.java
new file mode 100644
index 00000000000..401ae8f20b1
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicy.java
@@ -0,0 +1,91 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>New Child Policy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getRoles <em>Roles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getEClasses <em>EClasses</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewChildPolicy()
+ * @model abstract="true"
+ * @generated
+ */
+public interface NewChildPolicy extends EObject {
+ /**
+ * Returns the value of the '<em><b>Roles</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Roles</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Roles</em>' attribute list.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewChildPolicy_Roles()
+ * @model
+ * @generated
+ */
+ EList<String> getRoles();
+
+ /**
+ * Returns the value of the '<em><b>EClasses</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>EClasses</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>EClasses</em>' reference list.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewChildPolicy_EClasses()
+ * @model
+ * @generated
+ */
+ EList<EClass> getEClasses();
+
+ /**
+ * 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.ncpolicy.NcpolicyPackage#getNewChildPolicy_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy#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);
+
+} // NewChildPolicy
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicySet.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicySet.java
new file mode 100644
index 00000000000..45240617ace
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewChildPolicySet.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.constraints.DisplayUnit;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>New Child Policy Set</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#getPolicies <em>Policies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewChildPolicySet()
+ * @model
+ * @generated
+ */
+public interface NewChildPolicySet extends DisplayUnit {
+ /**
+ * 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.ncpolicy.NcpolicyPackage#getNewChildPolicySet_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet#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);
+
+ /**
+ * Returns the value of the '<em><b>Policies</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Policies</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>Policies</em>' containment reference list.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewChildPolicySet_Policies()
+ * @model containment="true"
+ * @generated
+ */
+ EList<NewChildPolicy> getPolicies();
+
+} // NewChildPolicySet
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewEMFChildMenu.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewEMFChildMenu.java
new file mode 100644
index 00000000000..ecd5020b6dd
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/NewEMFChildMenu.java
@@ -0,0 +1,108 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.papyrus.newchild.Menu;
+import org.eclipse.papyrus.newchild.MenuGroup;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>New EMF Child Menu</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getCreateIn <em>Create In</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getLayout <em>Layout</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getGroups <em>Groups</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewEMFChildMenu()
+ * @model
+ * @generated
+ */
+public interface NewEMFChildMenu extends Menu {
+ /**
+ * Returns the value of the '<em><b>Create In</b></em>' attribute.
+ * The default value is <code>"self"</code>.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.newchild.ncpolicy.CreateIn}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Create In</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Create In</em>' attribute.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CreateIn
+ * @see #setCreateIn(CreateIn)
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewEMFChildMenu_CreateIn()
+ * @model default="self" required="true"
+ * @generated
+ */
+ CreateIn getCreateIn();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getCreateIn <em>Create In</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Create In</em>' attribute.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.CreateIn
+ * @see #getCreateIn()
+ * @generated
+ */
+ void setCreateIn(CreateIn value);
+
+ /**
+ * Returns the value of the '<em><b>Layout</b></em>' attribute.
+ * The default value is <code>"hierarchical"</code>.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.newchild.ncpolicy.Layout}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Layout</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Layout</em>' attribute.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.Layout
+ * @see #setLayout(Layout)
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getNewEMFChildMenu_Layout()
+ * @model default="hierarchical" required="true"
+ * @generated
+ */
+ Layout getLayout();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu#getLayout <em>Layout</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Layout</em>' attribute.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.Layout
+ * @see #getLayout()
+ * @generated
+ */
+ void setLayout(Layout value);
+
+ /**
+ * 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.ncpolicy.NcpolicyPackage#getNewEMFChildMenu_Groups()
+ * @model containment="true"
+ * @generated
+ */
+ EList<MenuGroup> getGroups();
+
+} // NewEMFChildMenu
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/ReplacePolicy.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/ReplacePolicy.java
new file mode 100644
index 00000000000..43ac0abcc60
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/ReplacePolicy.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.newchild.MenuItem;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Replace Policy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy#getReplaceWith <em>Replace With</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getReplacePolicy()
+ * @model
+ * @generated
+ */
+public interface ReplacePolicy extends NewChildPolicy {
+ /**
+ * Returns the value of the '<em><b>Replace With</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.newchild.MenuItem}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Replace With</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>Replace With</em>' containment reference list.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage#getReplacePolicy_ReplaceWith()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<MenuItem> getReplaceWith();
+
+} // ReplacePolicy
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/CustomPolicyImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/CustomPolicyImpl.java
new file mode 100644
index 00000000000..34a61858384
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/CustomPolicyImpl.java
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.ncpolicy.CustomPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Custom Policy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.CustomPolicyImpl#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CustomPolicyImpl extends NewChildPolicyImpl implements CustomPolicy {
+ /**
+ * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClassName()
+ * @generated
+ * @ordered
+ */
+ protected static final String CLASS_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClassName()
+ * @generated
+ * @ordered
+ */
+ protected String className = CLASS_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CustomPolicyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.CUSTOM_POLICY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setClassName(String newClassName) {
+ String oldClassName = className;
+ className = newClassName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NcpolicyPackage.CUSTOM_POLICY__CLASS_NAME, oldClassName, className));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NcpolicyPackage.CUSTOM_POLICY__CLASS_NAME:
+ return getClassName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case NcpolicyPackage.CUSTOM_POLICY__CLASS_NAME:
+ setClassName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.CUSTOM_POLICY__CLASS_NAME:
+ setClassName(CLASS_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.CUSTOM_POLICY__CLASS_NAME:
+ return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
+ }
+ 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(" (className: ");
+ result.append(className);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CustomPolicyImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/FilterPolicyImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/FilterPolicyImpl.java
new file mode 100644
index 00000000000..166f7b17ab8
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/FilterPolicyImpl.java
@@ -0,0 +1,43 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Filter Policy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class FilterPolicyImpl extends NewChildPolicyImpl implements FilterPolicy {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FilterPolicyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.FILTER_POLICY;
+ }
+
+} //FilterPolicyImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyFactoryImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyFactoryImpl.java
new file mode 100644
index 00000000000..54b2f45fb35
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyFactoryImpl.java
@@ -0,0 +1,218 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.ncpolicy.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NcpolicyFactoryImpl extends EFactoryImpl implements NcpolicyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NcpolicyFactory init() {
+ try {
+ NcpolicyFactory theNcpolicyFactory = (NcpolicyFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/newchild/policy");
+ if (theNcpolicyFactory != null) {
+ return theNcpolicyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new NcpolicyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU: return createNewEMFChildMenu();
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET: return createNewChildPolicySet();
+ case NcpolicyPackage.FILTER_POLICY: return createFilterPolicy();
+ case NcpolicyPackage.REPLACE_POLICY: return createReplacePolicy();
+ case NcpolicyPackage.CUSTOM_POLICY: return createCustomPolicy();
+ 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 NcpolicyPackage.CREATE_IN:
+ return createCreateInFromString(eDataType, initialValue);
+ case NcpolicyPackage.LAYOUT:
+ return createLayoutFromString(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 NcpolicyPackage.CREATE_IN:
+ return convertCreateInToString(eDataType, instanceValue);
+ case NcpolicyPackage.LAYOUT:
+ return convertLayoutToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NewEMFChildMenu createNewEMFChildMenu() {
+ NewEMFChildMenuImpl newEMFChildMenu = new NewEMFChildMenuImpl();
+ return newEMFChildMenu;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NewChildPolicySet createNewChildPolicySet() {
+ NewChildPolicySetImpl newChildPolicySet = new NewChildPolicySetImpl();
+ return newChildPolicySet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterPolicy createFilterPolicy() {
+ FilterPolicyImpl filterPolicy = new FilterPolicyImpl();
+ return filterPolicy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReplacePolicy createReplacePolicy() {
+ ReplacePolicyImpl replacePolicy = new ReplacePolicyImpl();
+ return replacePolicy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomPolicy createCustomPolicy() {
+ CustomPolicyImpl customPolicy = new CustomPolicyImpl();
+ return customPolicy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CreateIn createCreateInFromString(EDataType eDataType, String initialValue) {
+ CreateIn result = CreateIn.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 convertCreateInToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Layout createLayoutFromString(EDataType eDataType, String initialValue) {
+ Layout result = Layout.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 convertLayoutToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyPackage getNcpolicyPackage() {
+ return (NcpolicyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static NcpolicyPackage getPackage() {
+ return NcpolicyPackage.eINSTANCE;
+ }
+
+} //NcpolicyFactoryImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyPackageImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyPackageImpl.java
new file mode 100644
index 00000000000..ea13793eb46
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NcpolicyPackageImpl.java
@@ -0,0 +1,460 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.NewchildPackage;
+
+import org.eclipse.papyrus.newchild.impl.NewchildPackageImpl;
+
+import org.eclipse.papyrus.newchild.ncpolicy.CreateIn;
+import org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.Layout;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyFactory;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
+import org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu;
+import org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NcpolicyPackageImpl extends EPackageImpl implements NcpolicyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass newEMFChildMenuEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass newChildPolicySetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass newChildPolicyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass filterPolicyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass replacePolicyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass customPolicyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum createInEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum layoutEEnum = 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.ncpolicy.NcpolicyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private NcpolicyPackageImpl() {
+ super(eNS_URI, NcpolicyFactory.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 NcpolicyPackage#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 NcpolicyPackage init() {
+ if (isInited) return (NcpolicyPackage)EPackage.Registry.INSTANCE.getEPackage(NcpolicyPackage.eNS_URI);
+
+ // Obtain or create and register package
+ NcpolicyPackageImpl theNcpolicyPackage = (NcpolicyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof NcpolicyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new NcpolicyPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ConstraintsPackage.eINSTANCE.eClass();
+ ExtendedtypesPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ NewchildPackageImpl theNewchildPackage = (NewchildPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NewchildPackage.eNS_URI) instanceof NewchildPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NewchildPackage.eNS_URI) : NewchildPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theNcpolicyPackage.createPackageContents();
+ theNewchildPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theNcpolicyPackage.initializePackageContents();
+ theNewchildPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theNcpolicyPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(NcpolicyPackage.eNS_URI, theNcpolicyPackage);
+ return theNcpolicyPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNewEMFChildMenu() {
+ return newEMFChildMenuEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNewEMFChildMenu_CreateIn() {
+ return (EAttribute)newEMFChildMenuEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNewEMFChildMenu_Layout() {
+ return (EAttribute)newEMFChildMenuEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNewEMFChildMenu_Groups() {
+ return (EReference)newEMFChildMenuEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNewChildPolicySet() {
+ return newChildPolicySetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNewChildPolicySet_Name() {
+ return (EAttribute)newChildPolicySetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNewChildPolicySet_Policies() {
+ return (EReference)newChildPolicySetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNewChildPolicy() {
+ return newChildPolicyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNewChildPolicy_Roles() {
+ return (EAttribute)newChildPolicyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNewChildPolicy_EClasses() {
+ return (EReference)newChildPolicyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNewChildPolicy_Name() {
+ return (EAttribute)newChildPolicyEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFilterPolicy() {
+ return filterPolicyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getReplacePolicy() {
+ return replacePolicyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getReplacePolicy_ReplaceWith() {
+ return (EReference)replacePolicyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCustomPolicy() {
+ return customPolicyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCustomPolicy_ClassName() {
+ return (EAttribute)customPolicyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getCreateIn() {
+ return createInEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getLayout() {
+ return layoutEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyFactory getNcpolicyFactory() {
+ return (NcpolicyFactory)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
+ newEMFChildMenuEClass = createEClass(NEW_EMF_CHILD_MENU);
+ createEAttribute(newEMFChildMenuEClass, NEW_EMF_CHILD_MENU__CREATE_IN);
+ createEAttribute(newEMFChildMenuEClass, NEW_EMF_CHILD_MENU__LAYOUT);
+ createEReference(newEMFChildMenuEClass, NEW_EMF_CHILD_MENU__GROUPS);
+
+ newChildPolicySetEClass = createEClass(NEW_CHILD_POLICY_SET);
+ createEAttribute(newChildPolicySetEClass, NEW_CHILD_POLICY_SET__NAME);
+ createEReference(newChildPolicySetEClass, NEW_CHILD_POLICY_SET__POLICIES);
+
+ newChildPolicyEClass = createEClass(NEW_CHILD_POLICY);
+ createEAttribute(newChildPolicyEClass, NEW_CHILD_POLICY__ROLES);
+ createEReference(newChildPolicyEClass, NEW_CHILD_POLICY__ECLASSES);
+ createEAttribute(newChildPolicyEClass, NEW_CHILD_POLICY__NAME);
+
+ filterPolicyEClass = createEClass(FILTER_POLICY);
+
+ replacePolicyEClass = createEClass(REPLACE_POLICY);
+ createEReference(replacePolicyEClass, REPLACE_POLICY__REPLACE_WITH);
+
+ customPolicyEClass = createEClass(CUSTOM_POLICY);
+ createEAttribute(customPolicyEClass, CUSTOM_POLICY__CLASS_NAME);
+
+ // Create enums
+ createInEEnum = createEEnum(CREATE_IN);
+ layoutEEnum = createEEnum(LAYOUT);
+ }
+
+ /**
+ * <!-- 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
+ NewchildPackage theNewchildPackage = (NewchildPackage)EPackage.Registry.INSTANCE.getEPackage(NewchildPackage.eNS_URI);
+ ConstraintsPackage theConstraintsPackage = (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ newEMFChildMenuEClass.getESuperTypes().add(theNewchildPackage.getMenu());
+ newChildPolicySetEClass.getESuperTypes().add(theConstraintsPackage.getDisplayUnit());
+ filterPolicyEClass.getESuperTypes().add(this.getNewChildPolicy());
+ replacePolicyEClass.getESuperTypes().add(this.getNewChildPolicy());
+ customPolicyEClass.getESuperTypes().add(this.getNewChildPolicy());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(newEMFChildMenuEClass, NewEMFChildMenu.class, "NewEMFChildMenu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getNewEMFChildMenu_CreateIn(), this.getCreateIn(), "createIn", "self", 1, 1, NewEMFChildMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getNewEMFChildMenu_Layout(), this.getLayout(), "layout", "hierarchical", 1, 1, NewEMFChildMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNewEMFChildMenu_Groups(), theNewchildPackage.getMenuGroup(), null, "groups", null, 0, -1, NewEMFChildMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(newChildPolicySetEClass, NewChildPolicySet.class, "NewChildPolicySet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getNewChildPolicySet_Name(), theEcorePackage.getEString(), "name", null, 1, 1, NewChildPolicySet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNewChildPolicySet_Policies(), this.getNewChildPolicy(), null, "policies", null, 0, -1, NewChildPolicySet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(newChildPolicyEClass, NewChildPolicy.class, "NewChildPolicy", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getNewChildPolicy_Roles(), theEcorePackage.getEString(), "roles", null, 0, -1, NewChildPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNewChildPolicy_EClasses(), theEcorePackage.getEClass(), null, "eClasses", null, 0, -1, NewChildPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getNewChildPolicy_Name(), theEcorePackage.getEString(), "name", null, 1, 1, NewChildPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(filterPolicyEClass, FilterPolicy.class, "FilterPolicy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(replacePolicyEClass, ReplacePolicy.class, "ReplacePolicy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getReplacePolicy_ReplaceWith(), theNewchildPackage.getMenuItem(), null, "replaceWith", null, 1, -1, ReplacePolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(customPolicyEClass, CustomPolicy.class, "CustomPolicy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCustomPolicy_ClassName(), theEcorePackage.getEString(), "className", null, 1, 1, CustomPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(createInEEnum, CreateIn.class, "CreateIn");
+ addEEnumLiteral(createInEEnum, CreateIn.SELF);
+ addEEnumLiteral(createInEEnum, CreateIn.PARENT);
+
+ initEEnum(layoutEEnum, Layout.class, "Layout");
+ addEEnumLiteral(layoutEEnum, Layout.HIERARCHICAL);
+ addEEnumLiteral(layoutEEnum, Layout.FLAT);
+ addEEnumLiteral(layoutEEnum, Layout.AUTO);
+ }
+
+} //NcpolicyPackageImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicyImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicyImpl.java
new file mode 100644
index 00000000000..9056aeb9461
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicyImpl.java
@@ -0,0 +1,244 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>New Child Policy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl#getRoles <em>Roles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl#getEClasses <em>EClasses</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicyImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class NewChildPolicyImpl extends EObjectImpl implements NewChildPolicy {
+ /**
+ * The cached value of the '{@link #getRoles() <em>Roles</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRoles()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> roles;
+
+ /**
+ * The cached value of the '{@link #getEClasses() <em>EClasses</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEClasses()
+ * @generated
+ * @ordered
+ */
+ protected EList<EClass> eClasses;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NewChildPolicyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.NEW_CHILD_POLICY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getRoles() {
+ if (roles == null) {
+ roles = new EDataTypeUniqueEList<String>(String.class, this, NcpolicyPackage.NEW_CHILD_POLICY__ROLES);
+ }
+ return roles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EClass> getEClasses() {
+ if (eClasses == null) {
+ eClasses = new EObjectResolvingEList<EClass>(EClass.class, this, NcpolicyPackage.NEW_CHILD_POLICY__ECLASSES);
+ }
+ return eClasses;
+ }
+
+ /**
+ * <!-- 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, NcpolicyPackage.NEW_CHILD_POLICY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY__ROLES:
+ return getRoles();
+ case NcpolicyPackage.NEW_CHILD_POLICY__ECLASSES:
+ return getEClasses();
+ case NcpolicyPackage.NEW_CHILD_POLICY__NAME:
+ return getName();
+ }
+ 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 NcpolicyPackage.NEW_CHILD_POLICY__ROLES:
+ getRoles().clear();
+ getRoles().addAll((Collection<? extends String>)newValue);
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY__ECLASSES:
+ getEClasses().clear();
+ getEClasses().addAll((Collection<? extends EClass>)newValue);
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY__ROLES:
+ getRoles().clear();
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY__ECLASSES:
+ getEClasses().clear();
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY__ROLES:
+ return roles != null && !roles.isEmpty();
+ case NcpolicyPackage.NEW_CHILD_POLICY__ECLASSES:
+ return eClasses != null && !eClasses.isEmpty();
+ case NcpolicyPackage.NEW_CHILD_POLICY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (roles: ");
+ result.append(roles);
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NewChildPolicyImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicySetImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicySetImpl.java
new file mode 100644
index 00000000000..dcbbc8a35f1
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewChildPolicySetImpl.java
@@ -0,0 +1,227 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.InternalEList;
+
+import org.eclipse.papyrus.constraints.impl.DisplayUnitImpl;
+
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>New Child Policy Set</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewChildPolicySetImpl#getPolicies <em>Policies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NewChildPolicySetImpl extends DisplayUnitImpl implements NewChildPolicySet {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getPolicies() <em>Policies</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPolicies()
+ * @generated
+ * @ordered
+ */
+ protected EList<NewChildPolicy> policies;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NewChildPolicySetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.NEW_CHILD_POLICY_SET;
+ }
+
+ /**
+ * <!-- 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, NcpolicyPackage.NEW_CHILD_POLICY_SET__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<NewChildPolicy> getPolicies() {
+ if (policies == null) {
+ policies = new EObjectContainmentEList<NewChildPolicy>(NewChildPolicy.class, this, NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES);
+ }
+ return policies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES:
+ return ((InternalEList<?>)getPolicies()).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 NcpolicyPackage.NEW_CHILD_POLICY_SET__NAME:
+ return getName();
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES:
+ return getPolicies();
+ }
+ 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 NcpolicyPackage.NEW_CHILD_POLICY_SET__NAME:
+ setName((String)newValue);
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES:
+ getPolicies().clear();
+ getPolicies().addAll((Collection<? extends NewChildPolicy>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES:
+ getPolicies().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET__POLICIES:
+ return policies != null && !policies.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NewChildPolicySetImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewEMFChildMenuImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewEMFChildMenuImpl.java
new file mode 100644
index 00000000000..9dce97f7be1
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/NewEMFChildMenuImpl.java
@@ -0,0 +1,280 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.InternalEList;
+import org.eclipse.papyrus.newchild.MenuGroup;
+import org.eclipse.papyrus.newchild.impl.MenuImpl;
+
+import org.eclipse.papyrus.newchild.ncpolicy.CreateIn;
+import org.eclipse.papyrus.newchild.ncpolicy.Layout;
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>New EMF Child Menu</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl#getCreateIn <em>Create In</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl#getLayout <em>Layout</em>}</li>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.NewEMFChildMenuImpl#getGroups <em>Groups</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NewEMFChildMenuImpl extends MenuImpl implements NewEMFChildMenu {
+ /**
+ * The default value of the '{@link #getCreateIn() <em>Create In</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreateIn()
+ * @generated
+ * @ordered
+ */
+ protected static final CreateIn CREATE_IN_EDEFAULT = CreateIn.SELF;
+
+ /**
+ * The cached value of the '{@link #getCreateIn() <em>Create In</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreateIn()
+ * @generated
+ * @ordered
+ */
+ protected CreateIn createIn = CREATE_IN_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLayout() <em>Layout</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLayout()
+ * @generated
+ * @ordered
+ */
+ protected static final Layout LAYOUT_EDEFAULT = Layout.HIERARCHICAL;
+
+ /**
+ * The cached value of the '{@link #getLayout() <em>Layout</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLayout()
+ * @generated
+ * @ordered
+ */
+ protected Layout layout = LAYOUT_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 NewEMFChildMenuImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.NEW_EMF_CHILD_MENU;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CreateIn getCreateIn() {
+ return createIn;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCreateIn(CreateIn newCreateIn) {
+ CreateIn oldCreateIn = createIn;
+ createIn = newCreateIn == null ? CREATE_IN_EDEFAULT : newCreateIn;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NcpolicyPackage.NEW_EMF_CHILD_MENU__CREATE_IN, oldCreateIn, createIn));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Layout getLayout() {
+ return layout;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLayout(Layout newLayout) {
+ Layout oldLayout = layout;
+ layout = newLayout == null ? LAYOUT_EDEFAULT : newLayout;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NcpolicyPackage.NEW_EMF_CHILD_MENU__LAYOUT, oldLayout, layout));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<MenuGroup> getGroups() {
+ if (groups == null) {
+ groups = new EObjectContainmentEList<MenuGroup>(MenuGroup.class, this, NcpolicyPackage.NEW_EMF_CHILD_MENU__GROUPS);
+ }
+ return groups;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__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 NcpolicyPackage.NEW_EMF_CHILD_MENU__CREATE_IN:
+ return getCreateIn();
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__LAYOUT:
+ return getLayout();
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__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 NcpolicyPackage.NEW_EMF_CHILD_MENU__CREATE_IN:
+ setCreateIn((CreateIn)newValue);
+ return;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__LAYOUT:
+ setLayout((Layout)newValue);
+ return;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__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 NcpolicyPackage.NEW_EMF_CHILD_MENU__CREATE_IN:
+ setCreateIn(CREATE_IN_EDEFAULT);
+ return;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__LAYOUT:
+ setLayout(LAYOUT_EDEFAULT);
+ return;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__GROUPS:
+ getGroups().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__CREATE_IN:
+ return createIn != CREATE_IN_EDEFAULT;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__LAYOUT:
+ return layout != LAYOUT_EDEFAULT;
+ case NcpolicyPackage.NEW_EMF_CHILD_MENU__GROUPS:
+ return groups != null && !groups.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (createIn: ");
+ result.append(createIn);
+ result.append(", layout: ");
+ result.append(layout);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NewEMFChildMenuImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/ReplacePolicyImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/ReplacePolicyImpl.java
new file mode 100644
index 00000000000..3c7ad3c10bb
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/impl/ReplacePolicyImpl.java
@@ -0,0 +1,155 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.newchild.MenuItem;
+
+import org.eclipse.papyrus.newchild.ncpolicy.NcpolicyPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Replace Policy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.newchild.ncpolicy.impl.ReplacePolicyImpl#getReplaceWith <em>Replace With</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ReplacePolicyImpl extends NewChildPolicyImpl implements ReplacePolicy {
+ /**
+ * The cached value of the '{@link #getReplaceWith() <em>Replace With</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReplaceWith()
+ * @generated
+ * @ordered
+ */
+ protected EList<MenuItem> replaceWith;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ReplacePolicyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NcpolicyPackage.Literals.REPLACE_POLICY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<MenuItem> getReplaceWith() {
+ if (replaceWith == null) {
+ replaceWith = new EObjectContainmentEList<MenuItem>(MenuItem.class, this, NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH);
+ }
+ return replaceWith;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH:
+ return ((InternalEList<?>)getReplaceWith()).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 NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH:
+ return getReplaceWith();
+ }
+ 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 NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH:
+ getReplaceWith().clear();
+ getReplaceWith().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 NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH:
+ getReplaceWith().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NcpolicyPackage.REPLACE_POLICY__REPLACE_WITH:
+ return replaceWith != null && !replaceWith.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ReplacePolicyImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyAdapterFactory.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyAdapterFactory.java
new file mode 100644
index 00000000000..653b5fb2264
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyAdapterFactory.java
@@ -0,0 +1,292 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.Menu;
+import org.eclipse.papyrus.newchild.MenuContainer;
+import org.eclipse.papyrus.newchild.MenuItem;
+
+import org.eclipse.papyrus.newchild.ncpolicy.*;
+
+/**
+ * <!-- 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.ncpolicy.NcpolicyPackage
+ * @generated
+ */
+public class NcpolicyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static NcpolicyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = NcpolicyPackage.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 NcpolicySwitch<Adapter> modelSwitch =
+ new NcpolicySwitch<Adapter>() {
+ @Override
+ public Adapter caseNewEMFChildMenu(NewEMFChildMenu object) {
+ return createNewEMFChildMenuAdapter();
+ }
+ @Override
+ public Adapter caseNewChildPolicySet(NewChildPolicySet object) {
+ return createNewChildPolicySetAdapter();
+ }
+ @Override
+ public Adapter caseNewChildPolicy(NewChildPolicy object) {
+ return createNewChildPolicyAdapter();
+ }
+ @Override
+ public Adapter caseFilterPolicy(FilterPolicy object) {
+ return createFilterPolicyAdapter();
+ }
+ @Override
+ public Adapter caseReplacePolicy(ReplacePolicy object) {
+ return createReplacePolicyAdapter();
+ }
+ @Override
+ public Adapter caseCustomPolicy(CustomPolicy object) {
+ return createCustomPolicyAdapter();
+ }
+ @Override
+ public Adapter caseMenuContainer(MenuContainer object) {
+ return createMenuContainerAdapter();
+ }
+ @Override
+ public Adapter caseMenuItem(MenuItem object) {
+ return createMenuItemAdapter();
+ }
+ @Override
+ public Adapter caseMenu(Menu object) {
+ return createMenuAdapter();
+ }
+ @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.ncpolicy.NewEMFChildMenu <em>New EMF 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.ncpolicy.NewEMFChildMenu
+ * @generated
+ */
+ public Adapter createNewEMFChildMenuAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet <em>New Child Policy Set</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet
+ * @generated
+ */
+ public Adapter createNewChildPolicySetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy <em>New Child Policy</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.ncpolicy.NewChildPolicy
+ * @generated
+ */
+ public Adapter createNewChildPolicyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy <em>Filter Policy</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.ncpolicy.FilterPolicy
+ * @generated
+ */
+ public Adapter createFilterPolicyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy <em>Replace Policy</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.ncpolicy.ReplacePolicy
+ * @generated
+ */
+ public Adapter createReplacePolicyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy <em>Custom Policy</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.ncpolicy.CustomPolicy
+ * @generated
+ */
+ public Adapter createCustomPolicyAdapter() {
+ 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.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.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.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;
+ }
+
+} //NcpolicyAdapterFactory
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceFactoryImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceFactoryImpl.java
new file mode 100644
index 00000000000..33689ef93bd
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceFactoryImpl.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.ncpolicy.util.NcpolicyResourceImpl
+ * @generated
+ */
+public class NcpolicyResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new NcpolicyResourceImpl(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;
+ }
+
+} //NcpolicyResourceFactoryImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceImpl.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceImpl.java
new file mode 100644
index 00000000000..b619077ba63
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyResourceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.ncpolicy.util.NcpolicyResourceFactoryImpl
+ * @generated
+ */
+public class NcpolicyResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public NcpolicyResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //NcpolicyResourceImpl
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicySwitch.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicySwitch.java
new file mode 100644
index 00000000000..b515a5a57c7
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicySwitch.java
@@ -0,0 +1,292 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.Menu;
+import org.eclipse.papyrus.newchild.MenuContainer;
+import org.eclipse.papyrus.newchild.MenuItem;
+
+import org.eclipse.papyrus.newchild.ncpolicy.*;
+
+/**
+ * <!-- 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.ncpolicy.NcpolicyPackage
+ * @generated
+ */
+public class NcpolicySwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static NcpolicyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicySwitch() {
+ if (modelPackage == null) {
+ modelPackage = NcpolicyPackage.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 NcpolicyPackage.NEW_EMF_CHILD_MENU: {
+ NewEMFChildMenu newEMFChildMenu = (NewEMFChildMenu)theEObject;
+ T result = caseNewEMFChildMenu(newEMFChildMenu);
+ if (result == null) result = caseMenu(newEMFChildMenu);
+ if (result == null) result = caseMenuContainer(newEMFChildMenu);
+ if (result == null) result = caseMenuItem(newEMFChildMenu);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NcpolicyPackage.NEW_CHILD_POLICY_SET: {
+ NewChildPolicySet newChildPolicySet = (NewChildPolicySet)theEObject;
+ T result = caseNewChildPolicySet(newChildPolicySet);
+ if (result == null) result = caseDisplayUnit(newChildPolicySet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NcpolicyPackage.NEW_CHILD_POLICY: {
+ NewChildPolicy newChildPolicy = (NewChildPolicy)theEObject;
+ T result = caseNewChildPolicy(newChildPolicy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NcpolicyPackage.FILTER_POLICY: {
+ FilterPolicy filterPolicy = (FilterPolicy)theEObject;
+ T result = caseFilterPolicy(filterPolicy);
+ if (result == null) result = caseNewChildPolicy(filterPolicy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NcpolicyPackage.REPLACE_POLICY: {
+ ReplacePolicy replacePolicy = (ReplacePolicy)theEObject;
+ T result = caseReplacePolicy(replacePolicy);
+ if (result == null) result = caseNewChildPolicy(replacePolicy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NcpolicyPackage.CUSTOM_POLICY: {
+ CustomPolicy customPolicy = (CustomPolicy)theEObject;
+ T result = caseCustomPolicy(customPolicy);
+ if (result == null) result = caseNewChildPolicy(customPolicy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>New EMF 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 EMF Child Menu</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNewEMFChildMenu(NewEMFChildMenu object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>New Child Policy Set</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>New Child Policy Set</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNewChildPolicySet(NewChildPolicySet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>New Child Policy</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 Policy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNewChildPolicy(NewChildPolicy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Filter Policy</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>Filter Policy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFilterPolicy(FilterPolicy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Replace Policy</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>Replace Policy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseReplacePolicy(ReplacePolicy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Custom Policy</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Custom Policy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCustomPolicy(CustomPolicy 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 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</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>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;
+ }
+
+} //NcpolicySwitch
diff --git a/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyXMLProcessor.java b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyXMLProcessor.java
new file mode 100644
index 00000000000..cb95b3a47a5
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/ncpolicy/util/NcpolicyXMLProcessor.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.newchild.ncpolicy.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.ncpolicy.NcpolicyPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NcpolicyXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NcpolicyXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ NcpolicyPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the NcpolicyResourceFactoryImpl 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 NcpolicyResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new NcpolicyResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //NcpolicyXMLProcessor
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
index 71b32dade49..00e57378784 100644
--- 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
@@ -98,10 +98,6 @@ public class NewchildAdapterFactory extends AdapterFactoryImpl {
return createMenuActionAdapter();
}
@Override
- public Adapter caseNewChildMenu(NewChildMenu object) {
- return createNewChildMenuAdapter();
- }
- @Override
public Adapter caseSeparator(Separator object) {
return createSeparatorAdapter();
}
@@ -222,20 +218,6 @@ public class NewchildAdapterFactory extends AdapterFactoryImpl {
}
/**
- * 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.Separator <em>Separator</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
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
new file mode 100644
index 00000000000..53d7b0b85bb
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceFactoryImpl.java
@@ -0,0 +1,56 @@
+/**
+ * <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
new file mode 100644
index 00000000000..483e317753c
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildResourceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * <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
index 4f7f1e1a977..e451dbdb8a7 100644
--- 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
@@ -113,15 +113,6 @@ public class NewchildSwitch<T> extends Switch<T> {
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.SEPARATOR: {
Separator separator = (Separator)theEObject;
T result = caseSeparator(separator);
@@ -238,21 +229,6 @@ public class NewchildSwitch<T> extends Switch<T> {
}
/**
- * 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>Separator</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
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
new file mode 100644
index 00000000000..0979380ff58
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src-gen/org/eclipse/papyrus/newchild/util/NewchildXMLProcessor.java
@@ -0,0 +1,54 @@
+/**
+ * <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/Activator.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/Activator.java
index 29647bc0eee..7597fde8701 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/Activator.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/Activator.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild;
import org.eclipse.papyrus.log.LogHelper;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/CreateChildAction.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/CreateChildAction.java
index de5c68ed6b4..aa5d0870b03 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/CreateChildAction.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/CreateChildAction.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.action;
import java.net.URL;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/ExtendedTypeAction.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/ExtendedTypeAction.java
new file mode 100644
index 00000000000..e98c1c9bd2c
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/action/ExtendedTypeAction.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.action;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.core.utils.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.extendedtypes.ExtendedElementTypeConfiguration;
+import org.eclipse.papyrus.extendedtypes.gmf.ExtendedEditHelperAdvice;
+import org.eclipse.papyrus.extendedtypes.gmf.ExtendedSemanticTypeDescriptor;
+import org.eclipse.papyrus.extendedtypes.gmf.types.ExtendedHintedTypeFactory;
+
+
+public class ExtendedTypeAction extends Action {
+
+ private IElementType elementType;
+
+ private EObject parent;
+
+ private EditingDomain domain;
+
+ private ExtendedSemanticTypeDescriptor descriptor;
+
+ public static ExtendedEditHelperAdvice advice = new ExtendedEditHelperAdvice();
+
+ public ExtendedTypeAction(EObject parent, ExtendedElementTypeConfiguration elementTypeConfiguration, EditingDomain domain) {
+ this.descriptor = new ExtendedSemanticTypeDescriptor(elementTypeConfiguration);
+ this.elementType = ExtendedHintedTypeFactory.getInstance().createSpecializationType(descriptor);
+ this.parent = parent;
+ this.domain = domain;
+
+ configureAction();
+ }
+
+ protected void configureAction() {
+ setText(descriptor.getName());
+ setImageDescriptor(ImageDescriptor.createFromURL(descriptor.getIconURL()));
+ }
+
+ @Override
+ public void run() {
+ CreateElementRequest request = new CreateElementRequest((TransactionalEditingDomain)domain, parent, elementType);
+ // ICommand beforeCommand = advice.getBeforeEditCommand(request);
+ ICommand command = new CreateElementCommand(request);
+ // baseCommand.getCommandResult().getReturnValue();
+ // ConfigureRequest configure = new ConfigureRequest(parent, elementType);
+ // ICommand afterCommand = advice.getAfterEditCommand(configure);
+ // CompositeCommand command = new CompositeCommand(getText());
+ //
+ // if(beforeCommand != null) {
+ // command.add(beforeCommand);
+ // }
+ // if (baseCommand != null){
+ // command.add(baseCommand);
+ // }
+ // if(afterCommand != null) {
+ // command.add(afterCommand);
+ // }
+
+ Command emfCommand = new GMFtoEMFCommandWrapper(command);
+
+ System.out.println(emfCommand.canExecute());
+ domain.getCommandStack().execute(emfCommand);
+ }
+}
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
index 663d9125cbf..2f069cf178a 100644
--- 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
@@ -1,8 +1,18 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
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
@@ -11,7 +21,7 @@ import org.eclipse.papyrus.newchild.MenuGroup;
*/
public abstract class AbstractCustomFillElement implements CustomFillElement {
- protected MenuGroup group;
+ protected FillMenuGroup group;
protected CustomFiller filler;
@@ -19,7 +29,7 @@ public abstract class AbstractCustomFillElement implements CustomFillElement {
this.filler = filler;
}
- public void setParentGroup(MenuGroup group) {
+ public void setParentGroup(FillMenuGroup group) {
this.group = group;
}
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
index 51b36414815..1c98925d089 100644
--- 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
@@ -1,7 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.papyrus.newchild.CustomFiller;
-import org.eclipse.papyrus.newchild.MenuGroup;
/**
* An interface for Custom menu filler
@@ -12,6 +22,6 @@ public interface CustomFillElement extends FillElement {
public void setMenuItem(CustomFiller filler);
- public void setParentGroup(MenuGroup group);
+ public void setParentGroup(FillMenuGroup group);
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillElement.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillElement.java
index 4f74722334c..ec15646452b 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillElement.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillElement.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenu.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenu.java
index 22e5bce7e3d..7305434b257 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenu.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenu.java
@@ -1,9 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.papyrus.newchild.Menu;
-import org.eclipse.papyrus.newchild.MenuGroup;
+import org.eclipse.papyrus.newchild.runtime.NewchildManager;
+import org.eclipse.papyrus.newchild.util.MenuHelper;
import org.eclipse.papyrus.newchild.util.Util;
@@ -11,9 +24,11 @@ public class FillMenu extends FillMenuContainer {
protected Menu menu;
- protected MenuGroup parentGroup;
+ protected FillMenuGroup parentGroup;
- public FillMenu(MenuGroup parentGroup, Menu menu, Object selectedObject) {
+ protected IMenuManager subMenu;
+
+ public FillMenu(FillMenuGroup parentGroup, Menu menu, Object selectedObject) {
super(menu, selectedObject);
this.menu = menu;
this.parentGroup = parentGroup;
@@ -21,7 +36,19 @@ public class FillMenu extends FillMenuContainer {
@Override
public void fill(IMenuManager menuManager) {
- MenuManager subMenuManager = new MenuManager(menu.getName(), Util.getImage(menu), menu.getId());
+ IMenuManager subMenuManager = getSubMenu(menuManager);
super.fill(subMenuManager);
}
+
+ protected IMenuManager getSubMenu(IMenuManager fromMenu) {
+ if(subMenu == null) {
+ subMenu = new MenuManager(menu.getName(), Util.getImage(menu), menu.getId());
+ MenuHelper.add(parentGroup, fromMenu, subMenu);
+
+ Separator separator = new Separator();
+ separator.setId(NewchildManager.TOP);
+ subMenu.add(separator);
+ }
+ return subMenu;
+ }
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuAction.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuAction.java
new file mode 100644
index 00000000000..aa6d9517ee5
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuAction.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.menu;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.papyrus.newchild.MenuAction;
+import org.eclipse.papyrus.newchild.action.ExtendedTypeAction;
+import org.eclipse.papyrus.newchild.util.EMFHelper;
+import org.eclipse.papyrus.newchild.util.MenuHelper;
+
+
+public class FillMenuAction implements FillElement {
+
+ private FillMenuGroup parentGroup;
+
+ private MenuAction menuAction;
+
+ private EObject selectedEObject;
+
+ private EditingDomain domain;
+
+ public FillMenuAction(FillMenuGroup parentGroup, MenuAction menuAction, Object selectedObject){
+ this.parentGroup = parentGroup;
+ this.menuAction = menuAction;
+ this.selectedEObject = EMFHelper.getEObject(selectedObject);
+ if(selectedEObject == null) {
+ throw new IllegalArgumentException("ExtendedTypes can only be used on EMF EObject");
+ }
+
+ domain = AdapterFactoryEditingDomain.getEditingDomainFor(selectedEObject);
+ }
+
+ public void fill(IMenuManager menuManager) {
+ MenuHelper.add(parentGroup, menuManager, new ExtendedTypeAction(selectedEObject, menuAction.getElementType(), domain));
+ }
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuContainer.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuContainer.java
index 1dc29186261..99a9be5c3da 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuContainer.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuContainer.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
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 fc6b4240c60..1f289befeda 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
@@ -1,27 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.papyrus.newchild.MenuGroup;
import org.eclipse.papyrus.newchild.MenuItem;
+import org.eclipse.papyrus.newchild.runtime.NewchildManager;
public class FillMenuGroup extends FillMenuContainer {
+ private static String TOP_SEP = "TMP_GROUP#TOP"; //$NON-NLS-1$
+
+ private static String END_SEP = "TMP_GROUP#END"; //$NON-NLS-1$
+
protected MenuGroup group;
+ protected String groupId = TOP_SEP;
+
public FillMenuGroup(MenuGroup group, Object selectedObject) {
super(group, selectedObject);
this.group = group;
}
@Override
- public void fill(IMenuManager menuManager) {
+ public void fill(IMenuManager manager) {
+
+ Separator tmpSeparator = new Separator(groupId);
+
+ if(manager.find(group.getBefore()) != null) {
+ manager.insertBefore(group.getBefore(), tmpSeparator);
+ } else if(manager.find(group.getAfter()) != null) {
+ manager.insertAfter(group.getAfter(), tmpSeparator);
+ } else if(group.getAbsolutePosition() != null) {
+ switch(group.getAbsolutePosition()) {
+ case TOP:
+ if(manager.find(NewchildManager.TOP) != null) {
+ manager.insertAfter(NewchildManager.TOP, tmpSeparator);
+ break;
+ }
+ case BOTTOM:
+ default:
+ manager.add(tmpSeparator);
+ break;
+ }
+ }
+
+ Separator endSeparator = new Separator(END_SEP);
+ manager.insertAfter(TOP_SEP, endSeparator);
+
for(MenuItem menuItem : container.getSubmenus()) {
- FillElement filler = FillerFactory.instance.getFiller(group, menuItem, selectedObject);
+ FillElement filler = FillerFactory.instance.getFiller(this, menuItem, selectedObject);
if(filler != null) {
- filler.fill(menuManager);
+ filler.fill(manager);
}
}
+
+ manager.remove(tmpSeparator);
+ manager.remove(endSeparator);
+ }
+
+ public String getGroupId() {
+ return groupId;
}
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuRoot.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuRoot.java
index 87a0633c3f0..5b70900bdd2 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuRoot.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillMenuRoot.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
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 0a670081ea5..38553681be1 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
@@ -1,9 +1,23 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
+import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -15,11 +29,17 @@ 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.ElementPosition;
+import org.eclipse.papyrus.newchild.Activator;
import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.NewChildKind;
-import org.eclipse.papyrus.newchild.NewChildMenu;
+import org.eclipse.papyrus.newchild.NewchildConfiguration;
import org.eclipse.papyrus.newchild.action.CreateChildAction;
+import org.eclipse.papyrus.newchild.ncpolicy.CreateIn;
+import org.eclipse.papyrus.newchild.ncpolicy.Layout;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
+import org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu;
+import org.eclipse.papyrus.newchild.policies.NewChildFillPolicy;
+import org.eclipse.papyrus.newchild.policies.PolicyManager;
+import org.eclipse.papyrus.newchild.policies.PolicyMatcher;
import org.eclipse.papyrus.newchild.runtime.DisabledContributionItem;
import org.eclipse.papyrus.newchild.util.EMFHelper;
import org.eclipse.papyrus.newchild.util.MenuHelper;
@@ -31,19 +51,31 @@ public class FillNewChild extends FillMenu implements FillElement {
protected EObject selectedEObject;
- protected NewChildMenu menu;
+ protected NewEMFChildMenu menu;
- public FillNewChild(MenuGroup parentGroup, NewChildMenu menu, Object selectedObject) {
+ //private static PolicyManager policyManager;
+
+ private PolicyManager policyManager;
+
+ public FillNewChild(FillMenuGroup parentGroup, NewEMFChildMenu menu, Object selectedObject) {
super(parentGroup, menu, selectedObject);
this.menu = menu;
this.selectedEObject = EMFHelper.getEObject(selectedObject);
+
+ //TODO : Extract that to a static instance, and load with extension point
+ policyManager = new PolicyManager();
+ try {
+ NewchildConfiguration configuration = (NewchildConfiguration)EMFHelper.loadEMFModel(null, URI.createPlatformResourceURI("org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi", true));
+ policyManager.addConfiguration(configuration);
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
}
@Override
public void fill(IMenuManager menuManager) {
-
EObject parentEObject = selectedEObject;
- if(menu.getPosition() == ElementPosition.SIBLING) {
+ if(menu.getCreateIn() == CreateIn.PARENT) {
if(selectedEObject != null) {
parentEObject = selectedEObject.eContainer();
}
@@ -60,8 +92,7 @@ public class FillNewChild extends FillMenu implements FillElement {
return;
}
- MenuManager createChildMenu = new MenuManager(menu.getName(), Util.getImage(menu), menu.getId());
- MenuHelper.add(parentGroup, menuManager, createChildMenu);
+ IMenuManager createChildMenu = getSubMenu(menuManager);
Map<EStructuralFeature, List<EClass>> instantiableClasses = new HashMap<EStructuralFeature, List<EClass>>();
@@ -72,12 +103,16 @@ public class FillNewChild extends FillMenu implements FillElement {
}
}
- NewChildKind kind = getKind(instantiableClasses);
+ Layout layout = getLayout(instantiableClasses);
- if(kind == NewChildKind.FLAT) {
+ Set<NewChildPolicySet> policySets = policyManager.getDisplayUnits(new StructuredSelection(parentEObject));
+ PolicyMatcher matcher = new PolicyMatcher();
+ matcher.setPolicies(policySets);
+
+ if(layout == Layout.FLAT) {
for(EStructuralFeature feature : instantiableClasses.keySet()) {
for(EClass eClass : instantiableClasses.get(feature)) {
- addCreateActionToMenu(createChildMenu, parentEObject, eClass, (EReference)feature);
+ addActionToMenu(matcher, createChildMenu, parentEObject, eClass, feature);
}
}
} else { //Hierarchical
@@ -86,32 +121,56 @@ public class FillNewChild extends FillMenu implements FillElement {
createChildMenu.add(subMenu);
for(EClass eClass : instantiableClasses.get(feature)) {
- addCreateActionToMenu(subMenu, parentEObject, eClass, (EReference)feature);
+ addActionToMenu(matcher, subMenu, parentEObject, eClass, feature);
}
}
}
+
+ super.fill(menuManager);
+
+ for(MenuGroup group : menu.getGroups()) {
+ FillerFactory.instance.getFiller(group, selectedObject).fill(createChildMenu);
+ }
+ }
+
+ protected void addActionToMenu(PolicyMatcher matcher, IMenuManager menu, EObject parentEObject, EClass eClass, EStructuralFeature feature) {
+ eClass = (EClass)eClass.getEPackage().getEClassifier(eClass.getName()); //Loads the EClass from the static resourceSet
+
+ List<NewChildFillPolicy> matchingPolicies = matcher.getMatchingPolicies(eClass, feature);
+ if(matchingPolicies.isEmpty()) {
+ addCreateActionToMenu(menu, parentEObject, eClass, (EReference)feature);
+ } else {
+ for(NewChildFillPolicy policy : matchingPolicies) {
+ policy.fill(menu, parentEObject, eClass, feature, parentEObject);
+ }
+ }
+ }
+
+ @Override
+ protected IMenuManager getSubMenu(IMenuManager menuManager) {
+ return super.getSubMenu(menuManager);
}
- private NewChildKind getKind(Map<EStructuralFeature, List<EClass>> instantiableClasses) {
- if(menu.getKind() != NewChildKind.AUTO) {
- return menu.getKind();
+ private Layout getLayout(Map<EStructuralFeature, List<EClass>> instantiableClasses) {
+ if(menu.getLayout() != Layout.AUTO) {
+ return menu.getLayout();
}
if(instantiableClasses.size() < 2) {
- return NewChildKind.FLAT;
+ return Layout.FLAT;
}
if(instantiableClasses.size() > 5) {
- return NewChildKind.HIERARCHICAL;
+ return Layout.HIERARCHICAL;
}
for(List<EClass> eClasses : instantiableClasses.values()) {
if(eClasses.size() > 5) {
- return NewChildKind.HIERARCHICAL;
+ return Layout.HIERARCHICAL;
}
}
- return NewChildKind.FLAT;
+ return Layout.FLAT;
}
private void addCreateActionToMenu(IMenuManager menuManager, EObject parent, EClass createAs, EReference createIn) {
@@ -123,6 +182,7 @@ public class FillNewChild extends FillMenu implements FillElement {
CreateChildAction action = new CreateChildAction(domain, parent, createIn, createAs);
IStructuredSelection selection = new StructuredSelection(parent);
action.configureAction(selection);
+ action.setId(createIn.getName() + "#" + createAs.getName());
return action;
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillSeparator.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillSeparator.java
index 95725dc79d2..b4dc0ac2b66 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillSeparator.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/menu/FillSeparator.java
@@ -1,7 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.papyrus.newchild.MenuGroup;
import org.eclipse.papyrus.newchild.Separator;
import org.eclipse.papyrus.newchild.util.MenuHelper;
@@ -10,9 +20,9 @@ public class FillSeparator implements FillElement {
protected Separator separator;
- protected MenuGroup group;
+ protected FillMenuGroup group;
- public FillSeparator(MenuGroup parentGroup, Separator separator) {
+ public FillSeparator(FillMenuGroup parentGroup, Separator separator) {
this.separator = separator;
this.group = parentGroup;
}
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 432615d994f..3d17df0c8c1 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,23 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
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.MenuAction;
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.Separator;
+import org.eclipse.papyrus.newchild.ncpolicy.NewEMFChildMenu;
public class FillerFactory {
public static FillerFactory instance = new FillerFactory();
- public FillElement getFiller(MenuGroup parentGroup, MenuItem menuItem, Object selectedObject) {
- if(menuItem instanceof NewChildMenu) {
- return new FillNewChild(parentGroup, (NewChildMenu)menuItem, selectedObject);
+ public FillElement getFiller(FillMenuGroup parentGroup, MenuItem menuItem, Object selectedObject) {
+ if(menuItem instanceof NewEMFChildMenu) {
+ return new FillNewChild(parentGroup, (NewEMFChildMenu)menuItem, selectedObject);
}
if(menuItem instanceof Separator) {
@@ -28,6 +40,10 @@ public class FillerFactory {
return new FillMenu(parentGroup, (Menu)menuItem, selectedObject);
}
+ if(menuItem instanceof MenuAction) {
+ return new FillMenuAction(parentGroup, (MenuAction)menuItem, selectedObject);
+ }
+
if(menuItem instanceof CustomFiller) {
String className = ((CustomFiller)menuItem).getClassName();
if (className != null){
@@ -51,6 +67,7 @@ public class FillerFactory {
}
}
+ Activator.log.warn("Unknown MenuItem type : " + menuItem.eClass().getName());
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
index b6c9698d612..a94b97430b2 100644
--- 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
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.menu;
import org.eclipse.jface.action.IMenuManager;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/AbstractFillPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/AbstractFillPolicy.java
new file mode 100644
index 00000000000..3577e468ef3
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/AbstractFillPolicy.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+
+
+public abstract class AbstractFillPolicy implements NewChildFillPolicy {
+
+ protected NewChildPolicy policy;
+
+ protected Collection<EClass> eClasses;
+
+ public Collection<EClass> getEClasses() {
+ if(eClasses == null) {
+ eClasses = new HashSet<EClass>();
+ for(EClass eClass : policy.getEClasses()) {
+ EPackage staticPackage = EPackage.Registry.INSTANCE.getEPackage(eClass.getEPackage().getNsURI());
+ eClass = (EClass)staticPackage.getEClassifier(eClass.getName());
+ eClasses.add(eClass);
+ }
+ }
+ return eClasses;
+ }
+
+ public Collection<String> getRoles() {
+ return policy.getRoles();
+ }
+
+ public void setPolicy(NewChildPolicy policy) {
+ this.policy = policy;
+ }
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/FilterFillPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/FilterFillPolicy.java
new file mode 100644
index 00000000000..487e05f7b32
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/FilterFillPolicy.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.action.IMenuManager;
+
+
+public class FilterFillPolicy extends AbstractFillPolicy {
+
+ public void fill(IMenuManager manager, EObject parentEObject, EClass eClass, EStructuralFeature role, EObject selectedEObject) {
+ return;
+ }
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/NewChildFillPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/NewChildFillPolicy.java
new file mode 100644
index 00000000000..c5179df201f
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/NewChildFillPolicy.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.papyrus.newchild.Activator;
+import org.eclipse.papyrus.newchild.ncpolicy.CustomPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.FilterPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy;
+
+
+public interface NewChildFillPolicy {
+
+ public void setPolicy(NewChildPolicy policy);
+
+ public Collection<EClass> getEClasses();
+
+ public Collection<String> getRoles();
+
+ public void fill(IMenuManager manager, EObject parentEObject, EClass eClass, EStructuralFeature role, EObject selectedEObject);
+
+ public class Factory {
+
+ public static Factory instance = new Factory();
+
+ private Factory() {
+ }
+
+ public NewChildFillPolicy getPolicy(NewChildPolicy policy) {
+ NewChildFillPolicy result = null;
+ if(policy instanceof ReplacePolicy) {
+ result = new ReplaceFillPolicy();
+ } else if(policy instanceof FilterPolicy) {
+ result = new FilterFillPolicy();
+ } else if(policy instanceof CustomPolicy) {
+ String className = ((CustomPolicy)policy).getClassName();
+ try {
+ return Class.forName(className).asSubclass(NewChildFillPolicy.class).newInstance();
+ } catch (InstantiationException ex) {
+ Activator.log.error(ex);
+ } catch (IllegalAccessException ex) {
+ Activator.log.error(ex);
+ } catch (ClassNotFoundException ex) {
+ Activator.log.error(ex);
+ } catch (ClassCastException ex) {
+ String message = "The CustomPolicy must implement " + NewChildFillPolicy.class.getName() + ". ";
+ message += "Class : " + className;
+ Activator.log.error(message, ex);
+ Activator.log.error(ex);
+ }
+ }
+
+ if(result != null) {
+ result.setPolicy(policy);
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyManager.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyManager.java
new file mode 100644
index 00000000000..989f7dd5c27
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyManager.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import org.eclipse.papyrus.constraints.ConstraintDescriptor;
+import org.eclipse.papyrus.constraints.runtime.DefaultConstraintEngine;
+import org.eclipse.papyrus.newchild.NewchildConfiguration;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
+
+
+public class PolicyManager extends DefaultConstraintEngine<NewChildPolicySet> {
+
+ @Override
+ public void refresh() {
+ //TODO
+ }
+
+ public void addConfiguration(NewchildConfiguration configuration) {
+ for(NewChildPolicySet policy : configuration.getNewChildPolicies()) {
+ for(ConstraintDescriptor descriptor : policy.getConstraints()) {
+ addConstraint(descriptor);
+ }
+ }
+ }
+
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyMatcher.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyMatcher.java
new file mode 100644
index 00000000000..1ecbe03ffa4
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/PolicyMatcher.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicy;
+import org.eclipse.papyrus.newchild.ncpolicy.NewChildPolicySet;
+import org.eclipse.papyrus.newchild.util.EMFHelper;
+
+
+public class PolicyMatcher {
+
+ private List<NewChildFillPolicy> fillPolicies;
+
+ public void setPolicies(Collection<NewChildPolicySet> policySets) {
+ this.fillPolicies = new LinkedList<NewChildFillPolicy>();
+ for(NewChildPolicySet policySet : policySets) {
+ for(NewChildPolicy policy : policySet.getPolicies()) {
+ NewChildFillPolicy fillPolicy = NewChildFillPolicy.Factory.instance.getPolicy(policy);
+ fillPolicies.add(fillPolicy);
+ }
+ }
+ }
+
+ public List<NewChildFillPolicy> getMatchingPolicies(EClass eClass, EStructuralFeature role){
+ List<NewChildFillPolicy> matchedPolicies = new LinkedList<NewChildFillPolicy>();
+
+ for (NewChildFillPolicy policy : fillPolicies){
+ if(matches(policy, eClass, role)) {
+ matchedPolicies.add(policy);
+ }
+ }
+
+ return matchedPolicies;
+ }
+
+ private boolean matches(NewChildFillPolicy policy, EClass eClass, EStructuralFeature role) {
+ Collection<EClass> eClasses = policy.getEClasses();
+ Collection<String> roles = policy.getRoles();
+
+ if(eClasses.isEmpty() && roles.isEmpty()) {
+ return true;
+ }
+
+ if(roles.contains(role.getName()) && (eClasses.isEmpty() || isContained(eClass, eClasses))) {
+ return true;
+ }
+
+ if((roles.isEmpty() || roles.contains(role)) && isContained(eClass, eClasses)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ private boolean isContained(EClass eClass, Collection<EClass> eClasses) {
+ for(EClass classToCheck : eClasses) {
+ if(EMFHelper.isSubclass(eClass, classToCheck)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/ReplaceFillPolicy.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/ReplaceFillPolicy.java
new file mode 100644
index 00000000000..d3fb1baa3fe
--- /dev/null
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/policies/ReplaceFillPolicy.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.newchild.policies;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.papyrus.newchild.MenuItem;
+import org.eclipse.papyrus.newchild.menu.FillElement;
+import org.eclipse.papyrus.newchild.menu.FillerFactory;
+import org.eclipse.papyrus.newchild.ncpolicy.ReplacePolicy;
+
+
+public class ReplaceFillPolicy extends AbstractFillPolicy {
+
+ public void fill(IMenuManager menuManager, EObject parentEObject, EClass eClass, EStructuralFeature role, EObject selectedEObject) {
+ for(MenuItem menuItem : getPolicy().getReplaceWith()) {
+ FillElement filler = FillerFactory.instance.getFiller(menuItem, selectedEObject);
+ filler.fill(menuManager);
+ }
+ }
+
+ public ReplacePolicy getPolicy() {
+ return (ReplacePolicy)policy;
+ }
+
+}
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 90bd808693b..7e16e180096 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
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.runtime;
import org.eclipse.jface.action.ContributionItem;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/MenuConstraintEngine.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/MenuConstraintEngine.java
index 8b459fc5f58..39493bdfd97 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/MenuConstraintEngine.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/MenuConstraintEngine.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.runtime;
import org.eclipse.papyrus.constraints.ConstraintDescriptor;
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/NewchildManager.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/NewchildManager.java
index 522aac7efa3..2874be4bc63 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/NewchildManager.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/runtime/NewchildManager.java
@@ -1,14 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.runtime;
import java.io.IOException;
-import java.util.Collections;
import java.util.Set;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.constraints.ConstraintDescriptor;
-import org.eclipse.papyrus.constraints.runtime.ConstraintEngine;
import org.eclipse.papyrus.newchild.Activator;
import org.eclipse.papyrus.newchild.MenuRoot;
import org.eclipse.papyrus.newchild.NewchildConfiguration;
@@ -16,16 +24,65 @@ import org.eclipse.papyrus.newchild.menu.FillElement;
import org.eclipse.papyrus.newchild.menu.FillerFactory;
import org.eclipse.papyrus.newchild.util.EMFHelper;
-
+/**
+ * A singleton manager for customizable "New child" menu.
+ *
+ * The custom menus are defined via {@link NewchildConfiguration}, which
+ * may be registered either with an extension point, programatically, or
+ * locally (In the preferences).
+ *
+ * Once set up, the manager simply takes a IMenuManager and a ISelection,
+ * and fills the menu according to the available {@link NewchildConfiguration}.
+ *
+ * USAGE : NewchildManager.instance.fillMenu(IMenuManager, IStructuredSelection)
+ *
+ * See the org.eclipse.papyrus.newchild.configuration extension point.
+ *
+ * @author Camille Letavernier
+ *
+ */
public class NewchildManager {
+ /**
+ * The ID of the menu's top element.
+ */
public static final String TOP = "top"; //$NON-NLS-1$
+
+ /**
+ * The singleton NewchildManager instance
+ */
public static NewchildManager instance = new NewchildManager();
+ /**
+ * The default {@link #ConstraintEngine} for this manager
+ */
+ public MenuConstraintEngine constraintEngine;
+
private NewchildManager() {
}
+ /**
+ * Fills the menuManager with a custom menu
+ *
+ * The menu will be retrieved via registered {@link NewchildConfiguration}s,
+ * depending on the given selection.
+ *
+ * The menu manager should have an IContributionItem with the {@link #TOP} id ;
+ * otherwise, the absolute position "top" won't work properly.
+ *
+ * @param menuManager
+ * @param selection
+ */
public void fillMenu(IMenuManager menuManager, IStructuredSelection selection) {
+ constraintEngine = new MenuConstraintEngine();
+ try {
+ //TODO : Load that from extension point
+ NewchildConfiguration configuration = (NewchildConfiguration)EMFHelper.loadEMFModel(null, URI.createPlatformResourceURI("org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi", true));
+ constraintEngine.addConfiguration(configuration);
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+
Set<MenuRoot> roots = findRootsFor(selection);
if(roots.isEmpty()) {
return;
@@ -39,21 +96,7 @@ public class NewchildManager {
}
private Set<MenuRoot> findRootsFor(IStructuredSelection selection) {
- try {
- NewchildConfiguration configuration = (NewchildConfiguration)EMFHelper.loadEMFModel(null, URI.createPlatformPluginURI("org.eclipse.papyrus.newchild/Model/NewchildConfiguration.xmi", true));
- ConstraintEngine<MenuRoot> constraintEngine = new MenuConstraintEngine();
- for(MenuRoot root : configuration.getRoots()) {
- for (ConstraintDescriptor descriptor : root.getConstraints()){
- constraintEngine.addConstraint(descriptor);
- }
- }
-
- Set<MenuRoot> roots = constraintEngine.getDisplayUnits(selection);
- return roots;
- } catch (IOException ex) {
- Activator.log.error(ex);
- }
-
- return Collections.EMPTY_SET;
+ Set<MenuRoot> roots = constraintEngine.getDisplayUnits(selection);
+ return roots;
}
}
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 1c43ccc2458..54460af8316 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
@@ -118,16 +118,15 @@ public class EMFHelper {
return true;
}
+ if(eClass == fromClass) {
+ return true;
+ }
+
List<EClass> superTypes = eClass.getEAllSuperTypes();
if(superTypes.contains(fromClass)) {
return true;
- } else {
- for(EClass superClass : superTypes) {
- if(isSubclass(superClass, fromClass)) {
- return true;
- }
- }
}
+
return false;
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/MenuHelper.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/MenuHelper.java
index df4dca52001..108da1a31a5 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/MenuHelper.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/MenuHelper.java
@@ -1,35 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.util;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.papyrus.newchild.MenuGroup;
-import org.eclipse.papyrus.newchild.runtime.NewchildManager;
+import org.eclipse.papyrus.newchild.menu.FillMenuGroup;
public class MenuHelper {
- public static void add(MenuGroup group, IMenuManager manager, IContributionItem item) {
+ public static void add(FillMenuGroup group, IMenuManager manager, IContributionItem item) {
if(group == null) {
manager.add(item);
- } else if(manager.find(group.getBefore()) != null) {
- manager.insertBefore(group.getBefore(), item);
- } else if(manager.find(group.getAfter()) != null) {
- manager.insertAfter(group.getAfter(), item);
- } else if(group.getAbsolutePosition() != null) {
- switch(group.getAbsolutePosition()) {
- case TOP:
- if(manager.find(NewchildManager.TOP) != null) {
- manager.insertBefore(NewchildManager.TOP, item);
- break;
- }
- case BOTTOM:
- default:
- manager.add(item);
- break;
- }
} else {
- manager.add(item);
+ manager.appendToGroup(group.getGroupId(), item);
}
}
+ public static void add(FillMenuGroup group, IMenuManager manager, Action action) {
+ add(group, manager, new ActionContributionItem(action));
+ }
+
}
diff --git a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/Util.java b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/Util.java
index b24ede6e09a..77f9b6c81b1 100644
--- a/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/Util.java
+++ b/sandbox/org.eclipse.papyrus.newchild/src/org/eclipse/papyrus/newchild/util/Util.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.newchild.util;
import java.net.MalformedURLException;

Back to the top