|
@@ -1,266 +0,0 @@
|
|
|
-/**
|
|
|
- * <copyright>
|
|
|
- * </copyright>
|
|
|
- *
|
|
|
- * $Id$
|
|
|
- */
|
|
|
-package org.yakindu.sct.model.sgen.impl;
|
|
|
-
|
|
|
-import org.eclipse.emf.ecore.EAttribute;
|
|
|
-import org.eclipse.emf.ecore.EClass;
|
|
|
-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.Configuration;
|
|
|
-import org.yakindu.sct.model.sgen.GeneratorModel;
|
|
|
-import org.yakindu.sct.model.sgen.OutletConfiguration;
|
|
|
-import org.yakindu.sct.model.sgen.SGenFactory;
|
|
|
-import org.yakindu.sct.model.sgen.SGenPackage;
|
|
|
-
|
|
|
-import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
|
-
|
|
|
-/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * An implementation of the model <b>Package</b>.
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
-public class SGenPackageImpl extends EPackageImpl implements SGenPackage {
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private EClass generatorModelEClass = null;
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private EClass configurationEClass = null;
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private EClass outletConfigurationEClass = null;
|
|
|
-
|
|
|
- /**
|
|
|
- * Creates an instance of the model <b>Package</b>, registered with
|
|
|
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
|
|
- * package URI value.
|
|
|
- * <p>Note: the correct way to create the package is via the static
|
|
|
- * factory method {@link #init init()}, which also performs
|
|
|
- * initialization of the package, or returns the registered package,
|
|
|
- * if one already exists.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @see org.eclipse.emf.ecore.EPackage.Registry
|
|
|
- * @see org.yakindu.sct.model.sgen.SGenPackage#eNS_URI
|
|
|
- * @see #init()
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private SGenPackageImpl() {
|
|
|
- super(eNS_URI, SGenFactory.eINSTANCE);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private static boolean isInited = false;
|
|
|
-
|
|
|
- /**
|
|
|
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
|
|
- *
|
|
|
- * <p>This method is used to initialize {@link SGenPackage#eINSTANCE} when that field is accessed.
|
|
|
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @see #eNS_URI
|
|
|
- * @see #createPackageContents()
|
|
|
- * @see #initializePackageContents()
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public static SGenPackage init() {
|
|
|
- if (isInited) return (SGenPackage)EPackage.Registry.INSTANCE.getEPackage(SGenPackage.eNS_URI);
|
|
|
-
|
|
|
- // Obtain or create and register package
|
|
|
- SGenPackageImpl theSGenPackage = (SGenPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SGenPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SGenPackageImpl());
|
|
|
-
|
|
|
- isInited = true;
|
|
|
-
|
|
|
- // Initialize simple dependencies
|
|
|
- SGraphPackage.eINSTANCE.eClass();
|
|
|
-
|
|
|
- // Create package meta-data objects
|
|
|
- theSGenPackage.createPackageContents();
|
|
|
-
|
|
|
- // Initialize created meta-data
|
|
|
- theSGenPackage.initializePackageContents();
|
|
|
-
|
|
|
- // Mark meta-data to indicate it can't be changed
|
|
|
- theSGenPackage.freeze();
|
|
|
-
|
|
|
-
|
|
|
- // Update the registry and return the package
|
|
|
- EPackage.Registry.INSTANCE.put(SGenPackage.eNS_URI, theSGenPackage);
|
|
|
- return theSGenPackage;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EClass getGeneratorModel() {
|
|
|
- return generatorModelEClass;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EReference getGeneratorModel_Configurations() {
|
|
|
- return (EReference)generatorModelEClass.getEStructuralFeatures().get(0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EReference getGeneratorModel_Statecharts() {
|
|
|
- return (EReference)generatorModelEClass.getEStructuralFeatures().get(1);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EClass getConfiguration() {
|
|
|
- return configurationEClass;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EClass getOutletConfiguration() {
|
|
|
- return outletConfigurationEClass;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EAttribute getOutletConfiguration_Path() {
|
|
|
- return (EAttribute)outletConfigurationEClass.getEStructuralFeatures().get(0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public EAttribute getOutletConfiguration_Override() {
|
|
|
- return (EAttribute)outletConfigurationEClass.getEStructuralFeatures().get(1);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public SGenFactory getSGenFactory() {
|
|
|
- return (SGenFactory)getEFactoryInstance();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private boolean isCreated = false;
|
|
|
-
|
|
|
- /**
|
|
|
- * Creates the meta-model objects for the package. This method is
|
|
|
- * guarded to have no affect on any invocation but its first.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public void createPackageContents() {
|
|
|
- if (isCreated) return;
|
|
|
- isCreated = true;
|
|
|
-
|
|
|
- // Create classes and their features
|
|
|
- generatorModelEClass = createEClass(GENERATOR_MODEL);
|
|
|
- createEReference(generatorModelEClass, GENERATOR_MODEL__CONFIGURATIONS);
|
|
|
- createEReference(generatorModelEClass, GENERATOR_MODEL__STATECHARTS);
|
|
|
-
|
|
|
- configurationEClass = createEClass(CONFIGURATION);
|
|
|
-
|
|
|
- outletConfigurationEClass = createEClass(OUTLET_CONFIGURATION);
|
|
|
- createEAttribute(outletConfigurationEClass, OUTLET_CONFIGURATION__PATH);
|
|
|
- createEAttribute(outletConfigurationEClass, OUTLET_CONFIGURATION__OVERRIDE);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- private boolean isInitialized = false;
|
|
|
-
|
|
|
- /**
|
|
|
- * Complete the initialization of the package and its meta-model. This
|
|
|
- * method is guarded to have no affect on any invocation but its first.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
- * @generated
|
|
|
- */
|
|
|
- public void initializePackageContents() {
|
|
|
- if (isInitialized) return;
|
|
|
- isInitialized = true;
|
|
|
-
|
|
|
- // Initialize package
|
|
|
- setName(eNAME);
|
|
|
- setNsPrefix(eNS_PREFIX);
|
|
|
- setNsURI(eNS_URI);
|
|
|
-
|
|
|
- // Obtain other dependent packages
|
|
|
- SGraphPackage theSGraphPackage = (SGraphPackage)EPackage.Registry.INSTANCE.getEPackage(SGraphPackage.eNS_URI);
|
|
|
-
|
|
|
- // Create type parameters
|
|
|
-
|
|
|
- // Set bounds for type parameters
|
|
|
-
|
|
|
- // Add supertypes to classes
|
|
|
- outletConfigurationEClass.getESuperTypes().add(this.getConfiguration());
|
|
|
-
|
|
|
- // Initialize classes and features; add operations and parameters
|
|
|
- initEClass(generatorModelEClass, GeneratorModel.class, "GeneratorModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEReference(getGeneratorModel_Configurations(), this.getConfiguration(), null, "configurations", null, 0, -1, GeneratorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEReference(getGeneratorModel_Statecharts(), theSGraphPackage.getStatechart(), null, "statecharts", null, 0, -1, GeneratorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- initEClass(configurationEClass, Configuration.class, "Configuration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
-
|
|
|
- initEClass(outletConfigurationEClass, OutletConfiguration.class, "OutletConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
- initEAttribute(getOutletConfiguration_Path(), ecorePackage.getEString(), "path", null, 0, 1, OutletConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
- initEAttribute(getOutletConfiguration_Override(), ecorePackage.getEBoolean(), "override", null, 0, 1, OutletConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
-
|
|
|
- // Create resource
|
|
|
- createResource(eNS_URI);
|
|
|
- }
|
|
|
-
|
|
|
-} //SGenPackageImpl
|