コード例 #1
0
  /**
   * 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
    Xtend2Package theXtend2Package =
        (Xtend2Package) EPackage.Registry.INSTANCE.getEPackage(Xtend2Package.eNS_URI);
    XbasePackage theXbasePackage =
        (XbasePackage) EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI);

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    literalEClass.getESuperTypes().add(this.getLinePart());
    lineBreakEClass.getESuperTypes().add(this.getLiteral());
    forLoopStartEClass.getESuperTypes().add(this.getLinePart());
    forLoopEndEClass.getESuperTypes().add(this.getLinePart());
    printedExpressionEClass.getESuperTypes().add(this.getLinePart());
    ifConditionStartEClass.getESuperTypes().add(this.getLinePart());
    elseIfConditionEClass.getESuperTypes().add(this.getLinePart());
    elseStartEClass.getESuperTypes().add(this.getLinePart());
    endIfEClass.getESuperTypes().add(this.getLinePart());

    // Initialize classes and features; add operations and parameters
    initEClass(
        processedRichStringEClass,
        ProcessedRichString.class,
        "ProcessedRichString",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getProcessedRichString_RichString(),
        theXtend2Package.getRichString(),
        null,
        "richString",
        null,
        0,
        1,
        ProcessedRichString.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getProcessedRichString_Lines(),
        this.getLine(),
        this.getLine_RichString(),
        "lines",
        null,
        0,
        -1,
        ProcessedRichString.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        lineEClass, Line.class, "Line", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getLine_Parts(),
        this.getLinePart(),
        this.getLinePart_Line(),
        "parts",
        null,
        0,
        -1,
        Line.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getLine_RichString(),
        this.getProcessedRichString(),
        this.getProcessedRichString_Lines(),
        "richString",
        null,
        0,
        1,
        Line.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        linePartEClass,
        LinePart.class,
        "LinePart",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getLinePart_Line(),
        this.getLine(),
        this.getLine_Parts(),
        "line",
        null,
        0,
        1,
        LinePart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        literalEClass,
        Literal.class,
        "Literal",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getLiteral_Literal(),
        theXtend2Package.getRichStringLiteral(),
        null,
        "literal",
        null,
        0,
        1,
        Literal.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEAttribute(
        getLiteral_Offset(),
        ecorePackage.getEInt(),
        "offset",
        null,
        0,
        1,
        Literal.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEAttribute(
        getLiteral_Length(),
        ecorePackage.getEInt(),
        "length",
        null,
        0,
        1,
        Literal.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        lineBreakEClass,
        LineBreak.class,
        "LineBreak",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);

    initEClass(
        forLoopStartEClass,
        ForLoopStart.class,
        "ForLoopStart",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getForLoopStart_Loop(),
        theXtend2Package.getRichStringForLoop(),
        null,
        "loop",
        null,
        0,
        1,
        ForLoopStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getForLoopStart_End(),
        this.getForLoopEnd(),
        this.getForLoopEnd_Start(),
        "end",
        null,
        0,
        1,
        ForLoopStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        forLoopEndEClass,
        ForLoopEnd.class,
        "ForLoopEnd",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getForLoopEnd_Start(),
        this.getForLoopStart(),
        this.getForLoopStart_End(),
        "start",
        null,
        0,
        1,
        ForLoopEnd.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        printedExpressionEClass,
        PrintedExpression.class,
        "PrintedExpression",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getPrintedExpression_Expression(),
        theXbasePackage.getXExpression(),
        null,
        "expression",
        null,
        0,
        1,
        PrintedExpression.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        ifConditionStartEClass,
        IfConditionStart.class,
        "IfConditionStart",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getIfConditionStart_RichStringIf(),
        theXtend2Package.getRichStringIf(),
        null,
        "richStringIf",
        null,
        0,
        1,
        IfConditionStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getIfConditionStart_ElseStart(),
        this.getElseStart(),
        this.getElseStart_IfConditionStart(),
        "elseStart",
        null,
        0,
        1,
        IfConditionStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getIfConditionStart_ElseIfConditions(),
        this.getElseIfCondition(),
        this.getElseIfCondition_IfConditionStart(),
        "elseIfConditions",
        null,
        0,
        -1,
        IfConditionStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getIfConditionStart_EndIf(),
        this.getEndIf(),
        null,
        "endIf",
        null,
        0,
        1,
        IfConditionStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        elseIfConditionEClass,
        ElseIfCondition.class,
        "ElseIfCondition",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getElseIfCondition_RichStringElseIf(),
        theXtend2Package.getRichStringElseIf(),
        null,
        "richStringElseIf",
        null,
        0,
        1,
        ElseIfCondition.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getElseIfCondition_IfConditionStart(),
        this.getIfConditionStart(),
        this.getIfConditionStart_ElseIfConditions(),
        "ifConditionStart",
        null,
        0,
        1,
        ElseIfCondition.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        elseStartEClass,
        ElseStart.class,
        "ElseStart",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getElseStart_IfConditionStart(),
        this.getIfConditionStart(),
        this.getIfConditionStart_ElseStart(),
        "ifConditionStart",
        null,
        0,
        1,
        ElseStart.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        endIfEClass,
        EndIf.class,
        "EndIf",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getEndIf_IfConditionStart(),
        this.getIfConditionStart(),
        null,
        "ifConditionStart",
        null,
        0,
        1,
        EndIf.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);
  }
コード例 #2
0
  /**
   * 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
    XbasePackage theXbasePackage =
        (XbasePackage) EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI);

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    deviceEClass.getESuperTypes().add(this.getDeclaration());
    ruleEClass.getESuperTypes().add(this.getDeclaration());

    // Initialize classes and features; add operations and parameters
    initEClass(
        modelEClass,
        Model.class,
        "Model",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getModel_Declarations(),
        this.getDeclaration(),
        null,
        "declarations",
        null,
        0,
        -1,
        Model.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        declarationEClass,
        Declaration.class,
        "Declaration",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);

    initEClass(
        deviceEClass,
        Device.class,
        "Device",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(
        getDevice_Name(),
        ecorePackage.getEString(),
        "name",
        null,
        0,
        1,
        Device.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getDevice_States(),
        this.getState(),
        null,
        "states",
        null,
        0,
        -1,
        Device.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        IS_COMPOSITE,
        !IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        stateEClass,
        State.class,
        "State",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(
        getState_Name(),
        ecorePackage.getEString(),
        "name",
        null,
        0,
        1,
        State.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        ruleEClass, Rule.class, "Rule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(
        getRule_Description(),
        ecorePackage.getEString(),
        "description",
        null,
        0,
        1,
        Rule.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getRule_DeviceState(),
        this.getState(),
        null,
        "deviceState",
        null,
        0,
        1,
        Rule.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_COMPOSITE,
        IS_RESOLVE_PROXIES,
        !IS_UNSETTABLE,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);
    initEReference(
        getRule_ThenPart(),
        theXbasePackage.getXExpression(),
        null,
        "thenPart",
        null,
        0,
        1,
        Rule.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);
  }
コード例 #3
0
  /**
   * 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
    XbasePackage theXbasePackage =
        (XbasePackage) EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI);

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    scriptEClass.getESuperTypes().add(theXbasePackage.getXBlockExpression());

    // Initialize classes and features; add operations and parameters
    initEClass(
        importEClass,
        Import.class,
        "Import",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(
        getImport_ImportedNamespace(),
        ecorePackage.getEString(),
        "importedNamespace",
        null,
        0,
        1,
        Import.class,
        !IS_TRANSIENT,
        !IS_VOLATILE,
        IS_CHANGEABLE,
        !IS_UNSETTABLE,
        !IS_ID,
        IS_UNIQUE,
        !IS_DERIVED,
        IS_ORDERED);

    initEClass(
        scriptEClass,
        Script.class,
        "Script",
        !IS_ABSTRACT,
        !IS_INTERFACE,
        IS_GENERATED_INSTANCE_CLASS);
    initEReference(
        getScript_Imports(),
        this.getImport(),
        null,
        "imports",
        null,
        0,
        -1,
        Script.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);
  }