Search in sources :

Example 1 with AmetamodelPackage

use of org.eclipse.xtext.grammarinheritance.ametamodel.AmetamodelPackage in project xtext-core by eclipse.

the class FooPackageImpl method initializePackageContents.

/**
 * 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
    EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
    AmetamodelPackage theAmetamodelPackage = (AmetamodelPackage) EPackage.Registry.INSTANCE.getEPackage(AmetamodelPackage.eNS_URI);
    // Create type parameters
    // Set bounds for type parameters
    // Add supertypes to classes
    concreteParserRuleEClass.getESuperTypes().add(this.getRootRule());
    callOverridenParserRuleEClass.getESuperTypes().add(this.getRootRule());
    aType2EClass.getESuperTypes().add(this.getRootRule());
    aType2EClass.getESuperTypes().add(theAmetamodelPackage.getAType());
    subrule1EClass.getESuperTypes().add(theAmetamodelPackage.getAType());
    subrule2EClass.getESuperTypes().add(theAmetamodelPackage.getAType());
    subrule3EClass.getESuperTypes().add(theAmetamodelPackage.getAType());
    callExtendedParserRuleEClass.getESuperTypes().add(this.getRootRule());
    // Initialize classes and features; add operations and parameters
    initEClass(rootRuleEClass, RootRule.class, "RootRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(concreteParserRuleEClass, ConcreteParserRule.class, "ConcreteParserRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getConcreteParserRule_MagicNumber(), theEcorePackage.getEDouble(), "magicNumber", null, 0, 1, ConcreteParserRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getConcreteParserRule_Elements(), theAmetamodelPackage.getAType(), null, "elements", null, 0, -1, ConcreteParserRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(callOverridenParserRuleEClass, CallOverridenParserRule.class, "CallOverridenParserRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getCallOverridenParserRule_Call(), theAmetamodelPackage.getAModel(), null, "call", null, 0, 1, CallOverridenParserRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(aType2EClass, AType2.class, "AType2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getAType2_Age(), theEcorePackage.getEInt(), "age", null, 0, 1, AType2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(subrule1EClass, Subrule1.class, "Subrule1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSubrule1_Sub1(), theEcorePackage.getEString(), "sub1", null, 0, 1, Subrule1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(subrule2EClass, Subrule2.class, "Subrule2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSubrule2_Sub2(), theEcorePackage.getEString(), "sub2", null, 0, 1, Subrule2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(subrule3EClass, Subrule3.class, "Subrule3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSubrule3_Sub1(), theEcorePackage.getEInt(), "sub1", null, 0, 1, Subrule3.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(callExtendedParserRuleEClass, CallExtendedParserRule.class, "CallExtendedParserRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getCallExtendedParserRule_Call(), theAmetamodelPackage.getAModel(), null, "call", null, 0, 1, CallExtendedParserRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    // Create resource
    createResource(eNS_URI);
}
Also used : EcorePackage(org.eclipse.emf.ecore.EcorePackage) AmetamodelPackage(org.eclipse.xtext.grammarinheritance.ametamodel.AmetamodelPackage)

Aggregations

EcorePackage (org.eclipse.emf.ecore.EcorePackage)1 AmetamodelPackage (org.eclipse.xtext.grammarinheritance.ametamodel.AmetamodelPackage)1