Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaged Elaasar2018-03-16 20:06:14 -0400
committerptessier2018-04-19 16:55:57 -0400
commit371756cd59fe03ac08e079a6a98b2b332da6ff92 (patch)
treec50ab6ebf82acaeaf37f372acba864a49a876a04 /plugins/infra/core
parent9795d6a6d23ed40a5fe31b89c6868e9c407a5edb (diff)
downloadorg.eclipse.papyrus-371756cd59fe03ac08e079a6a98b2b332da6ff92.tar.gz
org.eclipse.papyrus-371756cd59fe03ac08e079a6a98b2b332da6ff92.tar.xz
org.eclipse.papyrus-371756cd59fe03ac08e079a6a98b2b332da6ff92.zip
Bug 527664 - [AFViewpoints] Architecture Model Editor remove
CreationCommandClass property value Converted the Creation/ConversionCommandClass properties in the architecture editor to be of type string instead of Class. They can now reference class names from the workspace (on their project's class path). Also added validation rules for that. Finally, I added a Browse... button in the property sheet to help put values for them. remove some reexport increase version to take in account API tool Change-Id: I6792449fbee70b089f83780c4935242fff72d50b Signed-off-by: Maged Elaasar <melaasar@gmail.com>
Diffstat (limited to 'plugins/infra/core')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture.edit/META-INF/MANIFEST.MF12
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/META-INF/MANIFEST.MF11
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.ecore30
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel8
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/pom.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitectureContext.java36
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitecturePackage.java103
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitectureContextImpl.java156
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitecturePackageImpl.java57
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/util/ArchitectureValidator.java309
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF2
11 files changed, 675 insertions, 51 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture.edit/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture.edit/META-INF/MANIFEST.MF
index 003266d15ef..d5dcd896208 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture.edit/META-INF/MANIFEST.MF
@@ -10,10 +10,10 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.papyrus.infra.core.architecture.provider
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.core.architecture;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.types.edit;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.emf.ecore;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
- org.eclipse.emf.ecore.edit;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
+ org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[1.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.types.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.ecore.edit;bundle-version="[2.0.0,3.0.0)"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/META-INF/MANIFEST.MF
index 700d32b2ea2..f5279da3857 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.papyrus.infra.core.architecture;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -11,8 +11,9 @@ Export-Package: org.eclipse.papyrus.infra.core.architecture,
org.eclipse.papyrus.infra.core.architecture.impl,
org.eclipse.papyrus.infra.core.architecture.util
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
+ org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.14.0,4.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.ecore b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.ecore
index 6b53c7d9252..13fa2e4a432 100755
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.ecore
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.ecore
@@ -186,6 +186,24 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The superclass of architectural description languages or architecture frameworks. It defines a collection of viewpoints on models."/>
</eAnnotations>
+ <eOperations name="ceationCommandClassExists" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eParameters name="diagnostics" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDiagnosticChain"/>
+ <eParameters name="context" unique="false">
+ <eGenericType eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eOperations name="conversionCommandClassExists" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eParameters name="diagnostics" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDiagnosticChain"/>
+ <eParameters name="context" unique="false">
+ <eGenericType eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="viewpoints" upperBound="-1"
eType="#//ArchitectureViewpoint" containment="true" eOpposite="#//ArchitectureViewpoint/context">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -223,25 +241,21 @@
<details key="propertyCategory" value="Context"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationCommandClass" lowerBound="1">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationCommandClass" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The fully qualified name of a command that creates models applying this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelCreationCommand inteface"/>
<details key="propertyDescription" value="The fully qualified name of a command that creates models applying this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelCreationCommand inteface"/>
<details key="propertyCategory" value="Context"/>
</eAnnotations>
- <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
- <eTypeArguments/>
- </eGenericType>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="conversionCommandClass">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="conversionCommandClass"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The fully qualified name of a command that refactors models that switched to this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelConversionCommand inteface"/>
<details key="propertyDescription" value="The fully qualified name of a command that refactors models that switched to this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelConversionCommand inteface"/>
<details key="propertyCategory" value="Context"/>
</eAnnotations>
- <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
- <eTypeArguments/>
- </eGenericType>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ArchitectureFramework" eSuperTypes="#//ArchitectureContext">
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel
index 3624d20754d..dff58d12429 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel
@@ -85,6 +85,14 @@
ecoreFeature="ecore:EAttribute Architecture.ecore#//ArchitectureContext/creationCommandClass"/>
<genFeatures createChild="false" propertyCategory="Context" propertyDescription="The fully qualified name of a command that refactors models that switched to this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelConversionCommand inteface"
ecoreFeature="ecore:EAttribute Architecture.ecore#//ArchitectureContext/conversionCommandClass"/>
+ <genOperations ecoreOperation="Architecture.ecore#//ArchitectureContext/ceationCommandClassExists">
+ <genParameters ecoreParameter="Architecture.ecore#//ArchitectureContext/ceationCommandClassExists/diagnostics"/>
+ <genParameters ecoreParameter="Architecture.ecore#//ArchitectureContext/ceationCommandClassExists/context"/>
+ </genOperations>
+ <genOperations ecoreOperation="Architecture.ecore#//ArchitectureContext/conversionCommandClassExists">
+ <genParameters ecoreParameter="Architecture.ecore#//ArchitectureContext/conversionCommandClassExists/diagnostics"/>
+ <genParameters ecoreParameter="Architecture.ecore#//ArchitectureContext/conversionCommandClassExists/context"/>
+ </genOperations>
</genClasses>
<genClasses ecoreClass="Architecture.ecore#//ArchitectureFramework"/>
<genClasses ecoreClass="Architecture.ecore#//ArchitectureDescription">
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/pom.xml
index 3b10e0906b4..ac4b3aef8cd 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/pom.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/pom.xml
@@ -8,6 +8,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.core.architecture</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitectureContext.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitectureContext.java
index ab1c176a4db..0fa6e050ed0 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitectureContext.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitectureContext.java
@@ -13,6 +13,8 @@
*/
package org.eclipse.papyrus.infra.core.architecture;
+import java.util.Map;
+import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
@@ -144,13 +146,14 @@ public interface ArchitectureContext extends ADElement {
* The fully qualified name of a command that creates models applying this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelCreationCommand inteface
* <!-- end-model-doc -->
* @return the value of the '<em>Creation Command Class</em>' attribute.
- * @see #setCreationCommandClass(Class)
+ * @see #setCreationCommandClass(String)
* @see org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage#getArchitectureContext_CreationCommandClass()
* @model required="true"
* annotation="http://www.eclipse.org/emf/2002/GenModel propertyDescription='The fully qualified name of a command that creates models applying this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelCreationCommand inteface' propertyCategory='Context'"
* @generated
+ * @since 2.0
*/
- Class<?> getCreationCommandClass();
+ String getCreationCommandClass();
/**
* Sets the value of the '{@link org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#getCreationCommandClass <em>Creation Command Class</em>}' attribute.
@@ -159,8 +162,9 @@ public interface ArchitectureContext extends ADElement {
* @param value the new value of the '<em>Creation Command Class</em>' attribute.
* @see #getCreationCommandClass()
* @generated
+ * @since 2.0
*/
- void setCreationCommandClass(Class<?> value);
+ void setCreationCommandClass(String value);
/**
* Returns the value of the '<em><b>Conversion Command Class</b></em>' attribute.
@@ -174,12 +178,13 @@ public interface ArchitectureContext extends ADElement {
* The fully qualified name of a command that refactors models that switched to this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelConversionCommand inteface
* <!-- end-model-doc -->
* @return the value of the '<em>Conversion Command Class</em>' attribute.
- * @see #setConversionCommandClass(Class)
+ * @see #setConversionCommandClass(String)
* @see org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage#getArchitectureContext_ConversionCommandClass()
* @model annotation="http://www.eclipse.org/emf/2002/GenModel propertyDescription='The fully qualified name of a command that refactors models that switched to this context. The command must implement the org.eclipse.papyrus.infra.architecture.commands.IModelConversionCommand inteface' propertyCategory='Context'"
* @generated
+ * @since 2.0
*/
- Class<?> getConversionCommandClass();
+ String getConversionCommandClass();
/**
* Sets the value of the '{@link org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#getConversionCommandClass <em>Conversion Command Class</em>}' attribute.
@@ -188,8 +193,27 @@ public interface ArchitectureContext extends ADElement {
* @param value the new value of the '<em>Conversion Command Class</em>' attribute.
* @see #getConversionCommandClass()
* @generated
+ * @since 2.0
*/
- void setConversionCommandClass(Class<?> value);
+ void setConversionCommandClass(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model diagnosticsUnique="false" contextUnique="false"
+ * @generated
+ * @since 2.0
+ */
+ boolean ceationCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model diagnosticsUnique="false" contextUnique="false"
+ * @generated
+ * @since 2.0
+ */
+ boolean conversionCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* Returns the value of the '<em><b>Domain</b></em>' container reference.
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitecturePackage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitecturePackage.java
index 15710401468..4adbb0691d4 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitecturePackage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/ArchitecturePackage.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.infra.core.architecture;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -371,13 +372,33 @@ public interface ArchitecturePackage extends EPackage {
int ARCHITECTURE_CONTEXT_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 7;
/**
+ * The operation id for the '<em>Ceation Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The operation id for the '<em>Conversion Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = AD_ELEMENT_OPERATION_COUNT + 1;
+
+ /**
* The number of operations of the '<em>Context</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ARCHITECTURE_CONTEXT_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+ int ARCHITECTURE_CONTEXT_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.papyrus.infra.core.architecture.impl.ArchitectureDescriptionLanguageImpl <em>Description Language</em>}' class.
@@ -534,6 +555,26 @@ public interface ArchitecturePackage extends EPackage {
int ARCHITECTURE_DESCRIPTION_LANGUAGE_FEATURE_COUNT = ARCHITECTURE_CONTEXT_FEATURE_COUNT + 3;
/**
+ * The operation id for the '<em>Ceation Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_DESCRIPTION_LANGUAGE___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP;
+
+ /**
+ * The operation id for the '<em>Conversion Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_DESCRIPTION_LANGUAGE___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP;
+
+ /**
* The number of operations of the '<em>Description Language</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1034,6 +1075,26 @@ public interface ArchitecturePackage extends EPackage {
int ARCHITECTURE_FRAMEWORK_FEATURE_COUNT = ARCHITECTURE_CONTEXT_FEATURE_COUNT + 0;
/**
+ * The operation id for the '<em>Ceation Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_FRAMEWORK___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP;
+
+ /**
+ * The operation id for the '<em>Conversion Command Class Exists</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ int ARCHITECTURE_FRAMEWORK___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP;
+
+ /**
* The number of operations of the '<em>Framework</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1473,6 +1534,28 @@ public interface ArchitecturePackage extends EPackage {
EAttribute getArchitectureContext_ConversionCommandClass();
/**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#ceationCommandClassExists(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Ceation Command Class Exists</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Ceation Command Class Exists</em>' operation.
+ * @see org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#ceationCommandClassExists(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ * @generated
+ * @since 2.0
+ */
+ EOperation getArchitectureContext__CeationCommandClassExists__DiagnosticChain_Map();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#conversionCommandClassExists(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Conversion Command Class Exists</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Conversion Command Class Exists</em>' operation.
+ * @see org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#conversionCommandClassExists(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ * @generated
+ * @since 2.0
+ */
+ EOperation getArchitectureContext__ConversionCommandClassExists__DiagnosticChain_Map();
+
+ /**
* Returns the meta object for the container reference '{@link org.eclipse.papyrus.infra.core.architecture.ArchitectureContext#getDomain <em>Domain</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1839,6 +1922,24 @@ public interface ArchitecturePackage extends EPackage {
EAttribute ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS = eINSTANCE.getArchitectureContext_ConversionCommandClass();
/**
+ * The meta object literal for the '<em><b>Ceation Command Class Exists</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @since 2.0
+ */
+ EOperation ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = eINSTANCE.getArchitectureContext__CeationCommandClassExists__DiagnosticChain_Map();
+
+ /**
+ * The meta object literal for the '<em><b>Conversion Command Class Exists</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @since 2.0
+ */
+ EOperation ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP = eINSTANCE.getArchitectureContext__ConversionCommandClassExists__DiagnosticChain_Map();
+
+ /**
* The meta object literal for the '<em><b>Domain</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitectureContextImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitectureContextImpl.java
index 7fbdb422e0c..22c68cecdab 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitectureContextImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitectureContextImpl.java
@@ -13,25 +13,40 @@
*/
package org.eclipse.papyrus.infra.core.architecture.impl;
+import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
-
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
-
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectValidator;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.papyrus.infra.core.architecture.ArchitectureContext;
import org.eclipse.papyrus.infra.core.architecture.ArchitectureDomain;
import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage;
import org.eclipse.papyrus.infra.core.architecture.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.core.architecture.util.ArchitectureValidator;
import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
/**
@@ -105,6 +120,17 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
protected String extensionPrefix = EXTENSION_PREFIX_EDEFAULT;
/**
+ * The default value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreationCommandClass()
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ protected static final String CREATION_COMMAND_CLASS_EDEFAULT = null;
+
+ /**
* The cached value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -112,7 +138,18 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* @generated
* @ordered
*/
- protected Class<?> creationCommandClass;
+ protected String creationCommandClass = CREATION_COMMAND_CLASS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getConversionCommandClass() <em>Conversion Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConversionCommandClass()
+ * @generated
+ * @ordered
+ * @since 2.0
+ */
+ protected static final String CONVERSION_COMMAND_CLASS_EDEFAULT = null;
/**
* The cached value of the '{@link #getConversionCommandClass() <em>Conversion Command Class</em>}' attribute.
@@ -122,7 +159,7 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* @generated
* @ordered
*/
- protected Class<?> conversionCommandClass;
+ protected String conversionCommandClass = CONVERSION_COMMAND_CLASS_EDEFAULT;
/**
* <!-- begin-user-doc -->
@@ -205,7 +242,7 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* <!-- end-user-doc -->
* @generated
*/
- public Class<?> getCreationCommandClass() {
+ public String getCreationCommandClass() {
return creationCommandClass;
}
@@ -214,8 +251,8 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* <!-- end-user-doc -->
* @generated
*/
- public void setCreationCommandClass(Class<?> newCreationCommandClass) {
- Class<?> oldCreationCommandClass = creationCommandClass;
+ public void setCreationCommandClass(String newCreationCommandClass) {
+ String oldCreationCommandClass = creationCommandClass;
creationCommandClass = newCreationCommandClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ArchitecturePackage.ARCHITECTURE_CONTEXT__CREATION_COMMAND_CLASS, oldCreationCommandClass, creationCommandClass));
@@ -226,7 +263,7 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* <!-- end-user-doc -->
* @generated
*/
- public Class<?> getConversionCommandClass() {
+ public String getConversionCommandClass() {
return conversionCommandClass;
}
@@ -235,8 +272,8 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* <!-- end-user-doc -->
* @generated
*/
- public void setConversionCommandClass(Class<?> newConversionCommandClass) {
- Class<?> oldConversionCommandClass = conversionCommandClass;
+ public void setConversionCommandClass(String newConversionCommandClass) {
+ String oldConversionCommandClass = conversionCommandClass;
conversionCommandClass = newConversionCommandClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ArchitecturePackage.ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS, oldConversionCommandClass, conversionCommandClass));
@@ -245,6 +282,74 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean ceationCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (creationCommandClass != null) {
+ URI uri = eResource().getURI();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IFile file = workspace.getRoot().getFile(new Path(uri.toPlatformString(false)));
+ IProject project = file.getProject();
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = null;
+ try {
+ type = javaProject.findType(creationCommandClass);
+ } catch (JavaModelException e) {
+ /* ignore */
+ }
+ if (type == null) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ ArchitectureValidator.DIAGNOSTIC_SOURCE,
+ ArchitectureValidator.ARCHITECTURE_CONTEXT__CEATION_COMMAND_CLASS_EXISTS,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "ceationCommandClassExists", EObjectValidator.getObjectLabel(this, context) }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object [] { this }));
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean conversionCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (conversionCommandClass != null) {
+ URI uri = eResource().getURI();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IFile file = workspace.getRoot().getFile(new Path(uri.toPlatformString(false)));
+ IProject project = file.getProject();
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = null;
+ try {
+ type = javaProject.findType(conversionCommandClass);
+ } catch (JavaModelException e) {
+ /* ignore */
+ }
+ if (type == null) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ ArchitectureValidator.DIAGNOSTIC_SOURCE,
+ ArchitectureValidator.ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS_EXISTS,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "conversionCommandClassExists", EObjectValidator.getObjectLabel(this, context) }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object [] { this }));
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public ArchitectureDomain getDomain() {
@@ -386,10 +491,10 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
setExtensionPrefix((String)newValue);
return;
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CREATION_COMMAND_CLASS:
- setCreationCommandClass((Class<?>)newValue);
+ setCreationCommandClass((String)newValue);
return;
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS:
- setConversionCommandClass((Class<?>)newValue);
+ setConversionCommandClass((String)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -419,10 +524,10 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
setExtensionPrefix(EXTENSION_PREFIX_EDEFAULT);
return;
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CREATION_COMMAND_CLASS:
- setCreationCommandClass((Class<?>)null);
+ setCreationCommandClass(CREATION_COMMAND_CLASS_EDEFAULT);
return;
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS:
- setConversionCommandClass((Class<?>)null);
+ setConversionCommandClass(CONVERSION_COMMAND_CLASS_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -447,9 +552,9 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
case ArchitecturePackage.ARCHITECTURE_CONTEXT__EXTENSION_PREFIX:
return EXTENSION_PREFIX_EDEFAULT == null ? extensionPrefix != null : !EXTENSION_PREFIX_EDEFAULT.equals(extensionPrefix);
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CREATION_COMMAND_CLASS:
- return creationCommandClass != null;
+ return CREATION_COMMAND_CLASS_EDEFAULT == null ? creationCommandClass != null : !CREATION_COMMAND_CLASS_EDEFAULT.equals(creationCommandClass);
case ArchitecturePackage.ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS:
- return conversionCommandClass != null;
+ return CONVERSION_COMMAND_CLASS_EDEFAULT == null ? conversionCommandClass != null : !CONVERSION_COMMAND_CLASS_EDEFAULT.equals(conversionCommandClass);
}
return super.eIsSet(featureID);
}
@@ -460,6 +565,23 @@ public abstract class ArchitectureContextImpl extends ADElementImpl implements A
* @generated
*/
@Override
+ @SuppressWarnings("unchecked")
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case ArchitecturePackage.ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP:
+ return ceationCommandClassExists((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
+ case ArchitecturePackage.ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP:
+ return conversionCommandClassExists((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public String toString() {
if (eIsProxy()) return super.toString();
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitecturePackageImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitecturePackageImpl.java
index 73737f7b647..ab8cfc5d154 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitecturePackageImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ArchitecturePackageImpl.java
@@ -16,9 +16,11 @@ package org.eclipse.papyrus.infra.core.architecture.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.papyrus.infra.core.architecture.ADElement;
@@ -34,6 +36,7 @@ import org.eclipse.papyrus.infra.core.architecture.ArchitectureViewpoint;
import org.eclipse.papyrus.infra.core.architecture.Concern;
import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
import org.eclipse.papyrus.infra.core.architecture.Stakeholder;
+import org.eclipse.papyrus.infra.core.architecture.util.ArchitectureValidator;
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
/**
@@ -177,6 +180,15 @@ public class ArchitecturePackageImpl extends EPackageImpl implements Architectur
// Initialize created meta-data
theArchitecturePackage.initializePackageContents();
+ // Register package validator
+ EValidator.Registry.INSTANCE.put
+ (theArchitecturePackage,
+ new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return ArchitectureValidator.INSTANCE;
+ }
+ });
+
// Mark meta-data to indicate it can't be changed
theArchitecturePackage.freeze();
@@ -487,6 +499,24 @@ public class ArchitecturePackageImpl extends EPackageImpl implements Architectur
* <!-- end-user-doc -->
* @generated
*/
+ public EOperation getArchitectureContext__CeationCommandClassExists__DiagnosticChain_Map() {
+ return architectureContextEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getArchitectureContext__ConversionCommandClassExists__DiagnosticChain_Map() {
+ return architectureContextEClass.getEOperations().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EReference getArchitectureContext_Domain() {
return (EReference)architectureContextEClass.getEStructuralFeatures().get(3);
}
@@ -605,6 +635,8 @@ public class ArchitecturePackageImpl extends EPackageImpl implements Architectur
createEAttribute(architectureContextEClass, ARCHITECTURE_CONTEXT__EXTENSION_PREFIX);
createEAttribute(architectureContextEClass, ARCHITECTURE_CONTEXT__CREATION_COMMAND_CLASS);
createEAttribute(architectureContextEClass, ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS);
+ createEOperation(architectureContextEClass, ARCHITECTURE_CONTEXT___CEATION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP);
+ createEOperation(architectureContextEClass, ARCHITECTURE_CONTEXT___CONVERSION_COMMAND_CLASS_EXISTS__DIAGNOSTICCHAIN_MAP);
architectureFrameworkEClass = createEClass(ARCHITECTURE_FRAMEWORK);
@@ -640,6 +672,7 @@ public class ArchitecturePackageImpl extends EPackageImpl implements Architectur
// Obtain other dependent packages
ElementTypesConfigurationsPackage theElementTypesConfigurationsPackage = (ElementTypesConfigurationsPackage)EPackage.Registry.INSTANCE.getEPackage(ElementTypesConfigurationsPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
// Create type parameters
@@ -695,14 +728,26 @@ public class ArchitecturePackageImpl extends EPackageImpl implements Architectur
initEReference(getArchitectureContext_ElementTypes(), theElementTypesConfigurationsPackage.getElementTypeSetConfiguration(), null, "elementTypes", null, 0, -1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getArchitectureContext_Domain(), this.getArchitectureDomain(), this.getArchitectureDomain_Contexts(), "domain", null, 1, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(getArchitectureContext_ExtensionPrefix(), ecorePackage.getEString(), "extensionPrefix", null, 0, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- EGenericType g1 = createEGenericType(ecorePackage.getEJavaClass());
- EGenericType g2 = createEGenericType();
+ initEAttribute(getArchitectureContext_CreationCommandClass(), ecorePackage.getEString(), "creationCommandClass", null, 1, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getArchitectureContext_ConversionCommandClass(), ecorePackage.getEString(), "conversionCommandClass", null, 0, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ EOperation op = initEOperation(getArchitectureContext__CeationCommandClassExists__DiagnosticChain_Map(), ecorePackage.getEBoolean(), "ceationCommandClassExists", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theEcorePackage.getEDiagnosticChain(), "diagnostics", 0, 1, !IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(theEcorePackage.getEMap());
+ EGenericType g2 = createEGenericType(theEcorePackage.getEJavaObject());
+ g1.getETypeArguments().add(g2);
+ g2 = createEGenericType(theEcorePackage.getEJavaObject());
+ g1.getETypeArguments().add(g2);
+ addEParameter(op, g1, "context", 0, 1, !IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = initEOperation(getArchitectureContext__ConversionCommandClassExists__DiagnosticChain_Map(), ecorePackage.getEBoolean(), "conversionCommandClassExists", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theEcorePackage.getEDiagnosticChain(), "diagnostics", 0, 1, !IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEMap());
+ g2 = createEGenericType(theEcorePackage.getEJavaObject());
g1.getETypeArguments().add(g2);
- initEAttribute(getArchitectureContext_CreationCommandClass(), g1, "creationCommandClass", null, 1, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- g1 = createEGenericType(ecorePackage.getEJavaClass());
- g2 = createEGenericType();
+ g2 = createEGenericType(theEcorePackage.getEJavaObject());
g1.getETypeArguments().add(g2);
- initEAttribute(getArchitectureContext_ConversionCommandClass(), g1, "conversionCommandClass", null, 0, 1, ArchitectureContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, g1, "context", 0, 1, !IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
initEClass(architectureFrameworkEClass, ArchitectureFramework.class, "ArchitectureFramework", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/util/ArchitectureValidator.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/util/ArchitectureValidator.java
new file mode 100644
index 00000000000..5512f6fcd78
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/util/ArchitectureValidator.java
@@ -0,0 +1,309 @@
+/**
+ * Copyright (c) 2017 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:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.core.architecture.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.EObjectValidator;
+
+import org.eclipse.papyrus.infra.core.architecture.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage
+ * @generated
+ * @since 2.0
+ */
+public class ArchitectureValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final ArchitectureValidator INSTANCE = new ArchitectureValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.papyrus.infra.core.architecture"; //$NON-NLS-1$
+
+ /**
+ * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Ceation Command Class Exists' of 'Context'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final int ARCHITECTURE_CONTEXT__CEATION_COMMAND_CLASS_EXISTS = 1;
+
+ /**
+ * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Conversion Command Class Exists' of 'Context'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final int ARCHITECTURE_CONTEXT__CONVERSION_COMMAND_CLASS_EXISTS = 2;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 2;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureValidator() {
+ super();
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return ArchitecturePackage.eINSTANCE;
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case ArchitecturePackage.AD_ELEMENT:
+ return validateADElement((ADElement)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_DOMAIN:
+ return validateArchitectureDomain((ArchitectureDomain)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_DESCRIPTION_LANGUAGE:
+ return validateArchitectureDescriptionLanguage((ArchitectureDescriptionLanguage)value, diagnostics, context);
+ case ArchitecturePackage.STAKEHOLDER:
+ return validateStakeholder((Stakeholder)value, diagnostics, context);
+ case ArchitecturePackage.CONCERN:
+ return validateConcern((Concern)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_VIEWPOINT:
+ return validateArchitectureViewpoint((ArchitectureViewpoint)value, diagnostics, context);
+ case ArchitecturePackage.REPRESENTATION_KIND:
+ return validateRepresentationKind((RepresentationKind)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_CONTEXT:
+ return validateArchitectureContext((ArchitectureContext)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_FRAMEWORK:
+ return validateArchitectureFramework((ArchitectureFramework)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_DESCRIPTION:
+ return validateArchitectureDescription((ArchitectureDescription)value, diagnostics, context);
+ case ArchitecturePackage.ARCHITECTURE_DESCRIPTION_PREFERENCES:
+ return validateArchitectureDescriptionPreferences((ArchitectureDescriptionPreferences)value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateADElement(ADElement adElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(adElement, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureDomain(ArchitectureDomain architectureDomain, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(architectureDomain, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureDescriptionLanguage(ArchitectureDescriptionLanguage architectureDescriptionLanguage, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(architectureDescriptionLanguage, diagnostics, context)) return false;
+ boolean result = validate_EveryMultiplicityConforms(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryDataValueConforms(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryProxyResolves(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_UniqueID(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryKeyUnique(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_ceationCommandClassExists(architectureDescriptionLanguage, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_conversionCommandClassExists(architectureDescriptionLanguage, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateStakeholder(Stakeholder stakeholder, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(stakeholder, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateConcern(Concern concern, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(concern, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureViewpoint(ArchitectureViewpoint architectureViewpoint, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(architectureViewpoint, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateRepresentationKind(RepresentationKind representationKind, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(representationKind, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureContext(ArchitectureContext architectureContext, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(architectureContext, diagnostics, context)) return false;
+ boolean result = validate_EveryMultiplicityConforms(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryDataValueConforms(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryProxyResolves(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_UniqueID(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryKeyUnique(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_ceationCommandClassExists(architectureContext, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_conversionCommandClassExists(architectureContext, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ceationCommandClassExists constraint of '<em>Context</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureContext_ceationCommandClassExists(ArchitectureContext architectureContext, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return architectureContext.ceationCommandClassExists(diagnostics, context);
+ }
+
+ /**
+ * Validates the conversionCommandClassExists constraint of '<em>Context</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureContext_conversionCommandClassExists(ArchitectureContext architectureContext, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return architectureContext.conversionCommandClassExists(diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureFramework(ArchitectureFramework architectureFramework, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(architectureFramework, diagnostics, context)) return false;
+ boolean result = validate_EveryMultiplicityConforms(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryDataValueConforms(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryProxyResolves(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_UniqueID(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryKeyUnique(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_ceationCommandClassExists(architectureFramework, diagnostics, context);
+ if (result || diagnostics != null) result &= validateArchitectureContext_conversionCommandClassExists(architectureFramework, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureDescription(ArchitectureDescription architectureDescription, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(architectureDescription, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateArchitectureDescriptionPreferences(ArchitectureDescriptionPreferences architectureDescriptionPreferences, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(architectureDescriptionPreferences, diagnostics, context);
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ // TODO
+ // Specialize this to return a resource locator for messages specific to this validator.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return super.getResourceLocator();
+ }
+
+} //ArchitectureValidator
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
index 1c870582133..feb8bb261fc 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
@@ -28,7 +28,7 @@ Require-Bundle: org.eclipse.emf.workspace;bundle-version="[1.5.0,2.0.0)",
org.eclipse.core.expressions;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.commands;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.core.architecture;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[2.0.0,3.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.100.qualifier

Back to the top