|
@@ -6,20 +6,19 @@
|
|
|
*/
|
|
|
package org.yakindu.sct.model.sgen.impl;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
+import java.net.URL;
|
|
|
+
|
|
|
+import org.eclipse.emf.common.util.URI;
|
|
|
+import org.eclipse.emf.common.util.WrappedException;
|
|
|
import org.eclipse.emf.ecore.EAttribute;
|
|
|
import org.eclipse.emf.ecore.EClass;
|
|
|
-import org.eclipse.emf.ecore.EOperation;
|
|
|
+import org.eclipse.emf.ecore.EClassifier;
|
|
|
import org.eclipse.emf.ecore.EPackage;
|
|
|
import org.eclipse.emf.ecore.EReference;
|
|
|
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
|
|
-import org.yakindu.sct.model.sgen.FeatureConfiguration;
|
|
|
-import org.yakindu.sct.model.sgen.FeatureParameter;
|
|
|
-import org.yakindu.sct.model.sgen.FeatureParameterValue;
|
|
|
-import org.yakindu.sct.model.sgen.FeatureType;
|
|
|
-import org.yakindu.sct.model.sgen.FeatureTypeLibrary;
|
|
|
-import org.yakindu.sct.model.sgen.GeneratorConfiguration;
|
|
|
-import org.yakindu.sct.model.sgen.GeneratorEntry;
|
|
|
-import org.yakindu.sct.model.sgen.GeneratorModel;
|
|
|
+import org.eclipse.emf.ecore.resource.Resource;
|
|
|
+import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
|
|
|
import org.yakindu.sct.model.sgen.SGenFactory;
|
|
|
import org.yakindu.sct.model.sgen.SGenPackage;
|
|
|
import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
@@ -31,6 +30,13 @@ import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
|
* @generated
|
|
|
*/
|
|
|
public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc -->
|
|
|
+ * <!-- end-user-doc -->
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ protected String packageFilename = "sgen.ecore";
|
|
|
+
|
|
|
/**
|
|
|
* <!-- begin-user-doc -->
|
|
|
* <!-- end-user-doc -->
|
|
@@ -121,8 +127,6 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* <!-- begin-user-doc -->
|
|
|
* <!-- end-user-doc -->
|
|
|
* @see #eNS_URI
|
|
|
- * @see #createPackageContents()
|
|
|
- * @see #initializePackageContents()
|
|
|
* @generated
|
|
|
*/
|
|
|
public static SGenPackage init() {
|
|
@@ -136,11 +140,11 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
// Initialize simple dependencies
|
|
|
SGraphPackage.eINSTANCE.eClass();
|
|
|
|
|
|
- // Create package meta-data objects
|
|
|
- theSGenPackage.createPackageContents();
|
|
|
+ // Load packages
|
|
|
+ theSGenPackage.loadPackage();
|
|
|
|
|
|
- // Initialize created meta-data
|
|
|
- theSGenPackage.initializePackageContents();
|
|
|
+ // Fix loaded packages
|
|
|
+ theSGenPackage.fixPackageContents();
|
|
|
|
|
|
// Mark meta-data to indicate it can't be changed
|
|
|
theSGenPackage.freeze();
|
|
@@ -157,6 +161,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getGeneratorModel() {
|
|
|
+ if (generatorModelEClass == null) {
|
|
|
+ generatorModelEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(0);
|
|
|
+ }
|
|
|
return generatorModelEClass;
|
|
|
}
|
|
|
|
|
@@ -166,7 +173,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getGeneratorModel_Entries() {
|
|
|
- return (EReference)generatorModelEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getGeneratorModel().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -175,7 +182,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EAttribute getGeneratorModel_GeneratorId() {
|
|
|
- return (EAttribute)generatorModelEClass.getEStructuralFeatures().get(1);
|
|
|
+ return (EAttribute)getGeneratorModel().getEStructuralFeatures().get(1);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -184,6 +191,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getGeneratorConfiguration() {
|
|
|
+ if (generatorConfigurationEClass == null) {
|
|
|
+ generatorConfigurationEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(1);
|
|
|
+ }
|
|
|
return generatorConfigurationEClass;
|
|
|
}
|
|
|
|
|
@@ -193,7 +203,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getGeneratorConfiguration_Configurations() {
|
|
|
- return (EReference)generatorConfigurationEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getGeneratorConfiguration().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -202,6 +212,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getFeatureType() {
|
|
|
+ if (featureTypeEClass == null) {
|
|
|
+ featureTypeEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(2);
|
|
|
+ }
|
|
|
return featureTypeEClass;
|
|
|
}
|
|
|
|
|
@@ -211,7 +224,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureType_Parameters() {
|
|
|
- return (EReference)featureTypeEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getFeatureType().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -220,6 +233,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getFeatureParameter() {
|
|
|
+ if (featureParameterEClass == null) {
|
|
|
+ featureParameterEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(3);
|
|
|
+ }
|
|
|
return featureParameterEClass;
|
|
|
}
|
|
|
|
|
@@ -229,7 +245,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureParameter_FeatureType() {
|
|
|
- return (EReference)featureParameterEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getFeatureParameter().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -238,6 +254,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getFeatureConfiguration() {
|
|
|
+ if (featureConfigurationEClass == null) {
|
|
|
+ featureConfigurationEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(4);
|
|
|
+ }
|
|
|
return featureConfigurationEClass;
|
|
|
}
|
|
|
|
|
@@ -247,7 +266,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureConfiguration_Type() {
|
|
|
- return (EReference)featureConfigurationEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getFeatureConfiguration().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -256,7 +275,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureConfiguration_ParameterValues() {
|
|
|
- return (EReference)featureConfigurationEClass.getEStructuralFeatures().get(1);
|
|
|
+ return (EReference)getFeatureConfiguration().getEStructuralFeatures().get(1);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -265,6 +284,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getGeneratorEntry() {
|
|
|
+ if (generatorEntryEClass == null) {
|
|
|
+ generatorEntryEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(5);
|
|
|
+ }
|
|
|
return generatorEntryEClass;
|
|
|
}
|
|
|
|
|
@@ -274,7 +296,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getGeneratorEntry_Statechart() {
|
|
|
- return (EReference)generatorEntryEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getGeneratorEntry().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -283,7 +305,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getGeneratorEntry_Features() {
|
|
|
- return (EReference)generatorEntryEClass.getEStructuralFeatures().get(1);
|
|
|
+ return (EReference)getGeneratorEntry().getEStructuralFeatures().get(1);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -292,6 +314,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getFeatureParameterValue() {
|
|
|
+ if (featureParameterValueEClass == null) {
|
|
|
+ featureParameterValueEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(6);
|
|
|
+ }
|
|
|
return featureParameterValueEClass;
|
|
|
}
|
|
|
|
|
@@ -301,7 +326,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureParameterValue_Parameter() {
|
|
|
- return (EReference)featureParameterValueEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getFeatureParameterValue().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -310,7 +335,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EAttribute getFeatureParameterValue_Value() {
|
|
|
- return (EAttribute)featureParameterValueEClass.getEStructuralFeatures().get(1);
|
|
|
+ return (EAttribute)getFeatureParameterValue().getEStructuralFeatures().get(1);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -319,6 +344,9 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EClass getFeatureTypeLibrary() {
|
|
|
+ if (featureTypeLibraryEClass == null) {
|
|
|
+ featureTypeLibraryEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI).getEClassifiers().get(7);
|
|
|
+ }
|
|
|
return featureTypeLibraryEClass;
|
|
|
}
|
|
|
|
|
@@ -328,7 +356,7 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* @generated
|
|
|
*/
|
|
|
public EReference getFeatureTypeLibrary_Types() {
|
|
|
- return (EReference)featureTypeLibraryEClass.getEStructuralFeatures().get(0);
|
|
|
+ return (EReference)getFeatureTypeLibrary().getEStructuralFeatures().get(0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -345,47 +373,32 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* <!-- end-user-doc -->
|
|
|
* @generated
|
|
|
*/
|
|
|
- private boolean isCreated = false;
|
|
|
+ private boolean isLoaded = false;
|
|
|
|
|
|
/**
|
|
|
- * Creates the meta-model objects for the package. This method is
|
|
|
- * guarded to have no affect on any invocation but its first.
|
|
|
+ * Laods the package and any sub-packages from their serialized form.
|
|
|
* <!-- begin-user-doc -->
|
|
|
* <!-- end-user-doc -->
|
|
|
* @generated
|
|
|
*/
|
|
|
- public void createPackageContents() {
|
|
|
- if (isCreated) return;
|
|
|
- isCreated = true;
|
|
|
-
|
|
|
- // Create classes and their features
|
|
|
- generatorModelEClass = createEClass(GENERATOR_MODEL);
|
|
|
- createEReference(generatorModelEClass, GENERATOR_MODEL__ENTRIES);
|
|
|
- createEAttribute(generatorModelEClass, GENERATOR_MODEL__GENERATOR_ID);
|
|
|
-
|
|
|
- generatorConfigurationEClass = createEClass(GENERATOR_CONFIGURATION);
|
|
|
- createEReference(generatorConfigurationEClass, GENERATOR_CONFIGURATION__CONFIGURATIONS);
|
|
|
-
|
|
|
- featureTypeEClass = createEClass(FEATURE_TYPE);
|
|
|
- createEReference(featureTypeEClass, FEATURE_TYPE__PARAMETERS);
|
|
|
+ public void loadPackage() {
|
|
|
+ if (isLoaded) return;
|
|
|
+ isLoaded = true;
|
|
|
|
|
|
- featureParameterEClass = createEClass(FEATURE_PARAMETER);
|
|
|
- createEReference(featureParameterEClass, FEATURE_PARAMETER__FEATURE_TYPE);
|
|
|
-
|
|
|
- featureConfigurationEClass = createEClass(FEATURE_CONFIGURATION);
|
|
|
- createEReference(featureConfigurationEClass, FEATURE_CONFIGURATION__TYPE);
|
|
|
- createEReference(featureConfigurationEClass, FEATURE_CONFIGURATION__PARAMETER_VALUES);
|
|
|
-
|
|
|
- generatorEntryEClass = createEClass(GENERATOR_ENTRY);
|
|
|
- createEReference(generatorEntryEClass, GENERATOR_ENTRY__STATECHART);
|
|
|
- createEReference(generatorEntryEClass, GENERATOR_ENTRY__FEATURES);
|
|
|
-
|
|
|
- featureParameterValueEClass = createEClass(FEATURE_PARAMETER_VALUE);
|
|
|
- createEReference(featureParameterValueEClass, FEATURE_PARAMETER_VALUE__PARAMETER);
|
|
|
- createEAttribute(featureParameterValueEClass, FEATURE_PARAMETER_VALUE__VALUE);
|
|
|
-
|
|
|
- featureTypeLibraryEClass = createEClass(FEATURE_TYPE_LIBRARY);
|
|
|
- createEReference(featureTypeLibraryEClass, FEATURE_TYPE_LIBRARY__TYPES);
|
|
|
+ URL url = getClass().getResource(packageFilename);
|
|
|
+ if (url == null) {
|
|
|
+ throw new RuntimeException("Missing serialized package: " + packageFilename);
|
|
|
+ }
|
|
|
+ URI uri = URI.createURI(url.toString());
|
|
|
+ Resource resource = new EcoreResourceFactoryImpl().createResource(uri);
|
|
|
+ try {
|
|
|
+ resource.load(null);
|
|
|
+ }
|
|
|
+ catch (IOException exception) {
|
|
|
+ throw new WrappedException(exception);
|
|
|
+ }
|
|
|
+ initializeFromLoadedEPackage(this, (EPackage)resource.getContents().get(0));
|
|
|
+ createResource(eNS_URI);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -393,72 +406,32 @@ public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
* <!-- end-user-doc -->
|
|
|
* @generated
|
|
|
*/
|
|
|
- private boolean isInitialized = false;
|
|
|
+ private boolean isFixed = 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.
|
|
|
+ * Fixes up the loaded package, to make it appear as if it had been programmatically built.
|
|
|
* <!-- 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
|
|
|
- SGraphPackage theSGraphPackage = (SGraphPackage)EPackage.Registry.INSTANCE.getEPackage(SGraphPackage.eNS_URI);
|
|
|
-
|
|
|
- // Create type parameters
|
|
|
-
|
|
|
- // Set bounds for type parameters
|
|
|
-
|
|
|
- // Add supertypes to classes
|
|
|
- featureTypeEClass.getESuperTypes().add(theSGraphPackage.getNamedElement());
|
|
|
- featureParameterEClass.getESuperTypes().add(theSGraphPackage.getNamedElement());
|
|
|
-
|
|
|
- // Initialize classes and features; add operations and parameters
|
|
|
- initEClass(generatorModelEClass, GeneratorModel.class, "GeneratorModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getGeneratorModel_Entries(), this.getGeneratorEntry(), null, "entries", null, 0, -1, GeneratorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEAttribute(getGeneratorModel_GeneratorId(), ecorePackage.getEString(), "generatorId", null, 0, 1, GeneratorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(generatorConfigurationEClass, GeneratorConfiguration.class, "GeneratorConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getGeneratorConfiguration_Configurations(), this.getFeatureConfiguration(), null, "configurations", null, 0, -1, GeneratorConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(featureTypeEClass, FeatureType.class, "FeatureType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getFeatureType_Parameters(), this.getFeatureParameter(), this.getFeatureParameter_FeatureType(), "parameters", null, 0, -1, FeatureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(featureParameterEClass, FeatureParameter.class, "FeatureParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getFeatureParameter_FeatureType(), this.getFeatureType(), this.getFeatureType_Parameters(), "featureType", null, 0, 1, FeatureParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(featureConfigurationEClass, FeatureConfiguration.class, "FeatureConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getFeatureConfiguration_Type(), this.getFeatureType(), null, "type", null, 0, 1, FeatureConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEReference(getFeatureConfiguration_ParameterValues(), this.getFeatureParameterValue(), null, "parameterValues", null, 0, -1, FeatureConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- EOperation op = addEOperation(featureConfigurationEClass, this.getFeatureParameterValue(), "getParameterValue", 0, 1, IS_UNIQUE, IS_ORDERED);
|
|
|
- addEParameter(op, ecorePackage.getEString(), "parameterName", 0, 1, IS_UNIQUE, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(generatorEntryEClass, GeneratorEntry.class, "GeneratorEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getGeneratorEntry_Statechart(), theSGraphPackage.getStatechart(), null, "statechart", null, 0, 1, GeneratorEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEReference(getGeneratorEntry_Features(), this.getFeatureConfiguration(), null, "features", null, 0, -1, GeneratorEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- op = addEOperation(generatorEntryEClass, this.getFeatureConfiguration(), "getFeatureConfiguration", 0, 1, IS_UNIQUE, IS_ORDERED);
|
|
|
- addEParameter(op, ecorePackage.getEString(), "featureName", 0, 1, IS_UNIQUE, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(featureParameterValueEClass, FeatureParameterValue.class, "FeatureParameterValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getFeatureParameterValue_Parameter(), this.getFeatureParameter(), null, "parameter", null, 0, 1, FeatureParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEAttribute(getFeatureParameterValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, FeatureParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(featureTypeLibraryEClass, FeatureTypeLibrary.class, "FeatureTypeLibrary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getFeatureTypeLibrary_Types(), this.getFeatureType(), null, "types", null, 0, -1, FeatureTypeLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
+ public void fixPackageContents() {
|
|
|
+ if (isFixed) return;
|
|
|
+ isFixed = true;
|
|
|
+ fixEClassifiers();
|
|
|
+ }
|
|
|
|
|
|
- // Create resource
|
|
|
- createResource(eNS_URI);
|
|
|
+ /**
|
|
|
+ * Sets the instance class on the given classifier.
|
|
|
+ * <!-- begin-user-doc -->
|
|
|
+ * <!-- end-user-doc -->
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ protected void fixInstanceClass(EClassifier eClassifier) {
|
|
|
+ if (eClassifier.getInstanceClassName() == null) {
|
|
|
+ eClassifier.setInstanceClassName("org.yakindu.sct.model.sgen." + eClassifier.getName());
|
|
|
+ setGeneratedClassName(eClassifier);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
} //SGenPackageImpl
|