Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2015-03-26 08:29:54 +0000
committerBenoit Maggi2015-03-26 08:50:21 +0000
commitf5aa69046087df74fc3f7bb5108c8f3485c64371 (patch)
tree446a0313f2a572f031b70abfdc04c25fda9af5a9
parentc97eb80dd45d3c2db9bbe5ee4c413747f2209470 (diff)
downloadorg.eclipse.papyrus-f5aa69046087df74fc3f7bb5108c8f3485c64371.tar.gz
org.eclipse.papyrus-f5aa69046087df74fc3f7bb5108c8f3485c64371.tar.xz
org.eclipse.papyrus-f5aa69046087df74fc3f7bb5108c8f3485c64371.zip
Bug 463155 - [SysML 1.4] Diagram are not present in the NewDiagram menu
- add the definition for the root of sysml profile - modify the constraint to this new definition in each viewpointconfiguration Change-Id: I82c60ad5ae1244661b4c0e2c50c81037ca557430 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BlockDefinitionDiagram.configuration3
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/configuration/InternalBlockDiagram.configuration3
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/configuration/ParametricDiagram.configuration8
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/configuration/RequirementDiagram.configuration2
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml13
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlFactory.java28
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlPackage.java57
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlFactoryImpl.java85
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlPackageImpl.java206
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/package-info.java22
10 files changed, 415 insertions, 12 deletions
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BlockDefinitionDiagram.configuration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BlockDefinitionDiagram.configuration
index f507c69dd88..4ffae2983a4 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BlockDefinitionDiagram.configuration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BlockDefinitionDiagram.configuration
@@ -2,8 +2,7 @@
<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
<viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
<modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_ZrBf4JaBEeS8eNvSwD0lgA" name="SysML 1.4 Block Definition" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Diagram_BlockDefinition.gif" implementationID="PapyrusUMLClassDiagram" categories="_8pA0sMyjEeSuYbPdZwWlyw" customPalette="platform:/plugin/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration" customStyle="platform:/plugin/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/style/blockdiagram.css">
- <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
- <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ <profiles href="http://www.eclipse.org/papyrus/1.4/SysML#/"/>
<modelRules xmi:id="_ZrBf4ZaBEeS8eNvSwD0lgA">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/configuration/InternalBlockDiagram.configuration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/configuration/InternalBlockDiagram.configuration
index dfc063efe97..d4ee9aff453 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/configuration/InternalBlockDiagram.configuration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/configuration/InternalBlockDiagram.configuration
@@ -2,8 +2,7 @@
<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
<viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
<modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_ZrBf4JaBEeS8eNvSwD0lgA" name="SysML 1.4 Internal Block" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Diagram_InternalBlock.gif" implementationID="CompositeStructure" categories="_a6cL0MykEeSuYbPdZwWlyw" customPalette="platform:/plugin/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration">
- <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
- <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ <profiles href="http://www.eclipse.org/papyrus/1.4/SysML#/"/>
<modelRules xmi:id="_ZrBf4ZaBEeS8eNvSwD0lgA">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/configuration/ParametricDiagram.configuration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/configuration/ParametricDiagram.configuration
index 0c81949cc8b..db538fba105 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/configuration/ParametricDiagram.configuration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/configuration/ParametricDiagram.configuration
@@ -2,13 +2,7 @@
<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
<viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
<modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_ZrBf4JaBEeS8eNvSwD0lgA" name="SysML 1.4 Parametric" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png" implementationID="CompositeStructure" categories="_fUk00MykEeSuYbPdZwWlyw" customPalette="platform:/plugin/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration">
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/Allocations#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/Blocks#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/ConstraintBlocks#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/DeprecatedElements#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/ModelElements#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/PortAndFlows#/"/>
- <profiles href="http://www.eclipse.org/papyrus/1.4/SysML/Requirements#/"/>
+ <profiles href="http://www.eclipse.org/papyrus/1.4/SysML#/"/>
<modelRules xmi:id="_ZrBf4ZaBEeS8eNvSwD0lgA">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/configuration/RequirementDiagram.configuration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/configuration/RequirementDiagram.configuration
index 7e7e5dd574e..25d16a14f0a 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/configuration/RequirementDiagram.configuration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/configuration/RequirementDiagram.configuration
@@ -2,7 +2,7 @@
<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
<viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
<modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_ZrBf4JaBEeS8eNvSwD0lgA" name="SysML 1.4 Requirement" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif" implementationID="PapyrusUMLClassDiagram" categories="_lfthYMykEeSuYbPdZwWlyw" customPalette="platform:/plugin/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration">
- <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ <profiles href="http://www.eclipse.org/papyrus/1.4/SysML#/"/>
<modelRules xmi:id="_ZrBf4ZaBEeS8eNvSwD0lgA">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml
index c0a55372f9f..ac81d92f2c7 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml
@@ -91,6 +91,19 @@
</factory>
</extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/papyrus/1.4/SysML"
+ class="org.eclipse.papyrus.sysml14.definition.SysmlPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.uml2.uml.generated_package">
+ <profile uri="http://www.eclipse.org/papyrus/1.4/SysML"
+ location="platform:/plugin/org.eclipse.papyrus.sysml14/model/SysML.profile.uml#SysML"/>
+ </extension>
+
<extension
point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
<profile
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlFactory.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlFactory.java
new file mode 100644
index 00000000000..7c9b1f3595c
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlFactory.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2015 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
+ *
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.sysml14.definition;
+
+import org.eclipse.emf.ecore.EFactory;
+
+public interface SysmlFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ */
+ SysmlFactory eINSTANCE = org.eclipse.papyrus.sysml14.definition.internal.impl.SysmlFactoryImpl.init();
+
+ /**
+ * Returns the package supported by this factory.
+ * @return the package supported by this factory.
+ */
+ SysmlPackage getSysmlPackage();
+
+}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlPackage.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlPackage.java
new file mode 100644
index 00000000000..c3d2b514370
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/SysmlPackage.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2015 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
+ *
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.sysml14.definition;
+
+import org.eclipse.emf.ecore.EPackage;
+
+
+/**
+ * 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 operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * @see org.eclipse.papyrus.sysml.SysmlFactory
+ * @model kind="package"
+ * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='SysML'"
+ */
+public interface SysmlPackage extends EPackage {
+ /**
+ * The package name.
+ */
+ String eNAME = "sysml"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/1.4/SysML"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ */
+ String eNS_PREFIX = "SysML"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ */
+ SysmlPackage eINSTANCE = org.eclipse.papyrus.sysml14.definition.internal.impl.SysmlPackageImpl.init();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * @return the factory that creates the instances of the model.
+ */
+ SysmlFactory getSysmlFactory();
+
+}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlFactoryImpl.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlFactoryImpl.java
new file mode 100644
index 00000000000..c7634ea4b13
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlFactoryImpl.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) 2015 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
+ *
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.sysml14.definition.internal.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.sysml14.definition.SysmlFactory;
+import org.eclipse.papyrus.sysml14.definition.SysmlPackage;
+
+/**
+ * An implementation of the model <b>Factory</b>.
+ */
+public class SysmlFactoryImpl extends EFactoryImpl implements SysmlFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SysmlFactory init() {
+ try {
+ SysmlFactory thesysmlFactory = (SysmlFactory)EPackage.Registry.INSTANCE.getEFactory(SysmlPackage.eNS_URI);
+ if (thesysmlFactory != null) {
+ return thesysmlFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SysmlFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SysmlFactoryImpl() {
+ super();
+ }
+
+ /**
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ */
+ public String createDummyFromString(EDataType eDataType, String initialValue) {
+ return (String)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ */
+ public SysmlPackage getSysmlPackage() {
+ return (SysmlPackage)getEPackage();
+ }
+
+ /**
+ */
+ @Deprecated
+ public static SysmlPackage getPackage() {
+ return SysmlPackage.eINSTANCE;
+ }
+
+}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlPackageImpl.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlPackageImpl.java
new file mode 100644
index 00000000000..3f6b37b8e20
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/internal/impl/SysmlPackageImpl.java
@@ -0,0 +1,206 @@
+/**
+ * Copyright (c) 2015 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
+ *
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.sysml14.definition.internal.impl;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.sysml14.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml14.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml14.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml14.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml14.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml14.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml14.constraintblocks.ConstraintblocksPackage;
+import org.eclipse.papyrus.sysml14.constraintblocks.internal.impl.ConstraintblocksPackageImpl;
+import org.eclipse.papyrus.sysml14.definition.SysmlFactory;
+import org.eclipse.papyrus.sysml14.definition.SysmlPackage;
+import org.eclipse.papyrus.sysml14.deprecatedelements.DeprecatedelementsPackage;
+import org.eclipse.papyrus.sysml14.deprecatedelements.internal.impl.DeprecatedelementsPackageImpl;
+import org.eclipse.papyrus.sysml14.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml14.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml14.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml14.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml14.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml14.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * An implementation of the model <b>Package</b>.
+ */
+public class SysmlPackageImpl extends EPackageImpl implements SysmlPackage {
+
+ /**
+ * 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.
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml14.definition.SysmlPackage#eNS_URI
+ * @see #init()
+ *
+ */
+ private SysmlPackageImpl() {
+ super(eNS_URI, SysmlFactory.eINSTANCE);
+ }
+
+ /**
+ *
+ *
+ *
+ */
+ 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 SysmlPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ *
+ */
+ public static SysmlPackage init() {
+ if (isInited) return (SysmlPackage)EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SysmlPackageImpl thesysmlPackage = (SysmlPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SysmlPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) : PortandflowsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) : ActivitiesPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ ConstraintblocksPackageImpl theConstraintblocksPackage = (ConstraintblocksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConstraintblocksPackage.eNS_URI) instanceof ConstraintblocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintblocksPackage.eNS_URI) : ConstraintblocksPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) : RequirementsPackage.eINSTANCE);
+ DeprecatedelementsPackageImpl theDeprecatedelementsPackage = (DeprecatedelementsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeprecatedelementsPackage.eNS_URI) instanceof DeprecatedelementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeprecatedelementsPackage.eNS_URI) : DeprecatedelementsPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ thesysmlPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theConstraintblocksPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theDeprecatedelementsPackage.createPackageContents();
+
+ // Initialize created meta-data
+ thesysmlPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theConstraintblocksPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theDeprecatedelementsPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thesysmlPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SysmlPackage.eNS_URI, thesysmlPackage);
+ return thesysmlPackage;
+ }
+
+ public SysmlFactory getSysmlFactory() {
+ return (SysmlFactory)getEFactoryInstance();
+ }
+
+ 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.
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+ }
+
+ /**
+ *
+ *
+ *
+ */
+ 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.
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ BlocksPackage theBlocksPackage = (BlocksPackage)EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI);
+ PortandflowsPackage thePortandflowsPackage = (PortandflowsPackage)EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI);
+ ActivitiesPackage theActivitiesPackage = (ActivitiesPackage)EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI);
+ ModelelementsPackage theModelelementsPackage = (ModelelementsPackage)EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI);
+ ConstraintblocksPackage theConstraintblocksPackage = (ConstraintblocksPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintblocksPackage.eNS_URI);
+ AllocationsPackage theAllocationsPackage = (AllocationsPackage)EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI);
+ RequirementsPackage theRequirementsPackage = (RequirementsPackage)EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI);
+ DeprecatedelementsPackage theDeprecatedelementsPackage = (DeprecatedelementsPackage)EPackage.Registry.INSTANCE.getEPackage(DeprecatedelementsPackage.eNS_URI);
+
+ // Add subpackages
+ getESubpackages().add(theBlocksPackage);
+ getESubpackages().add(thePortandflowsPackage);
+ getESubpackages().add(theActivitiesPackage);
+ getESubpackages().add(theModelelementsPackage);
+ getESubpackages().add(theConstraintblocksPackage);
+ getESubpackages().add(theAllocationsPackage);
+ getESubpackages().add(theRequirementsPackage);
+ getESubpackages().add(theDeprecatedelementsPackage);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/uml2/2.0.0/UML
+ createUMLAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>.
+ */
+ protected void createUMLAnnotations() {
+ String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "originalName", "SysML" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/package-info.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/package-info.java
new file mode 100644
index 00000000000..e27417d9e19
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/definition/package-info.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+/**
+ * This package is used to manually define the root of the profile
+ * since emfgen is not able to generate element for empty package/profile
+ * (The only other solution is to use a <<Dummy>> element, we want to avoid this solution
+ * since the profile is provided by the OMG)
+ * @author Benoit Maggi (CEA LIST) benoit.maggi@cea.fr
+ *
+ */
+package org.eclipse.papyrus.sysml14.definition; \ No newline at end of file

Back to the top