Package eu.admire.dispel.references

Examples of eu.admire.dispel.references.DispelTypeReference


      LocalVariable var = getContainedLocalVariable(call);

      if ((call.getTypeReference() instanceof DispelTypeReference)
          && var != null) {

        DispelTypeReference ref = (DispelTypeReference) call
            .getTypeReference();

        if (!(ref.getTarget() instanceof ProcessingElementDefinition)) {

          resource.addProblem(new IDispelProblem() {

            public DispelEProblemType getType() {
              return DispelEProblemType.ANALYSIS_PROBLEM;
            }

            public String getMessage() {
              return "Only Processing Element can be instantiated";
            }

            public Collection<IDispelQuickFix> getQuickFixes() {
              return null;
            }

            public DispelEProblemSeverity getSeverity() {
              return DispelEProblemSeverity.ERROR;
            }
          }, call);

        }

        if (ref != null
            && ref.getTarget() instanceof ProcessingElementDefinition) {

          ProcessingElementDefinition pe = (ProcessingElementDefinition) ref
              .getTarget();

          if (pe != null && !pe.eIsProxy()) {

            ProcessingElementInstance instance = pe
                .createInstance();

            var.setValue(instance);

            if (!instance.getNamespaces().isEmpty()) {

              if (fnc != null)
                fnc.getProcessingElementInstances().add(
                    instance);
              else
                pck.getProcessingElementInstances().add(
                    instance);

            }
          }
        }

        if (ref != null && ref.getTarget() == null) {

          System.out.println("broken reference !!");

          // FIXME
View Full Code Here


        (ProcessingElementDefinition) EcoreUtil.copy(selectedPE);
    ProcessingElementInstance peInstance =
        (ProcessingElementInstance) peDef.createInstance();

    // PE
    DispelTypeReference ref1 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();
    DispelTypeReference ref2 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();
   
    Pair <AssignmentExpression, SuffixUnaryModificationExpression> p =
        Utility.createAssToSuffUModExpressionChain();

    //The "new" bit
    NewProcessingElementCall call = InstantiationsFactory.eINSTANCE
        .createNewProcessingElementCall();
    p.getRight().setChild(call);

    call.setTypeReference(ref2);
    ref1.setTarget(peDef);
    ref2.setTarget(peDef);

    // The variable we are setting to the PE.
    LocalVariableStatement statement = StatementsFactory.eINSTANCE
        .createLocalVariableStatement();
    LocalVariable variable = VariablesFactory.eINSTANCE
View Full Code Here

    ProcessingElementInstance peInstance = (ProcessingElementInstance) peDef
        .createInstance();

    // PE

    DispelTypeReference ref1 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();

    DispelTypeReference ref2 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();

    AssignmentExpression ex1 = ExpressionsFactory.eINSTANCE
        .createAssignmentExpression();

    ConditionalExpression ex2 = ExpressionsFactory.eINSTANCE
        .createConditionalExpression();

    ex1.setChild(ex2);

    ConditionalOrExpression ex3 = ExpressionsFactory.eINSTANCE
        .createConditionalOrExpression();

    ex2.setChild(ex3);

    ConditionalAndExpression ex4 = ExpressionsFactory.eINSTANCE
        .createConditionalAndExpression();

    ex3.getChildren().add(ex4);

    InclusiveOrExpression ex5 = ExpressionsFactory.eINSTANCE
        .createInclusiveOrExpression();

    ex4.getChildren().add(ex5);

    ExclusiveOrExpression ex6 = ExpressionsFactory.eINSTANCE
        .createExclusiveOrExpression();

    ex5.getChildren().add(ex6);

    AndExpression ex7 = ExpressionsFactory.eINSTANCE.createAndExpression();

    ex6.getChildren().add(ex7);

    EqualityExpression ex8 = ExpressionsFactory.eINSTANCE
        .createEqualityExpression();

    ex7.getChildren().add(ex8);

    RelationExpression ex9 = ExpressionsFactory.eINSTANCE
        .createRelationExpression();

    ex8.getChildren().add(ex9);

    ShiftExpression ex10 = ExpressionsFactory.eINSTANCE
        .createShiftExpression();

    ex9.getChildren().add(ex10);

    AdditiveExpression ex11 = ExpressionsFactory.eINSTANCE
        .createAdditiveExpression();

    ex10.getChildren().add(ex11);

    MultiplicativeExpression ex12 = ExpressionsFactory.eINSTANCE
        .createMultiplicativeExpression();

    ex11.getChildren().add(ex12);

    UnaryExpression ex13 = ExpressionsFactory.eINSTANCE
        .createUnaryExpression();

    ex12.getChildren().add(ex13);

    SuffixUnaryModificationExpression ex14 = ExpressionsFactory.eINSTANCE
        .createSuffixUnaryModificationExpression();

    ex13.setChild(ex14);

    NewProcessingElementCall call = InstantiationsFactory.eINSTANCE
        .createNewProcessingElementCall();

    ex14.setChild(call);

    call.setTypeReference(ref2);

    ref1.setTarget(peDef);
    ref2.setTarget(peDef);

    // VARIABLE:
    LocalVariableStatement statement = StatementsFactory.eINSTANCE
        .createLocalVariableStatement();
View Full Code Here

    ProcessingElementInstance peInstance = (ProcessingElementInstance) peDef
        .createInstance();

    // PE

    DispelTypeReference ref1 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();

    DispelTypeReference ref2 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();

    AssignmentExpression ex1 = ExpressionsFactory.eINSTANCE
        .createAssignmentExpression();

    ConditionalExpression ex2 = ExpressionsFactory.eINSTANCE
        .createConditionalExpression();

    ex1.setChild(ex2);

    ConditionalOrExpression ex3 = ExpressionsFactory.eINSTANCE
        .createConditionalOrExpression();

    ex2.setChild(ex3);

    ConditionalAndExpression ex4 = ExpressionsFactory.eINSTANCE
        .createConditionalAndExpression();

    ex3.getChildren().add(ex4);

    InclusiveOrExpression ex5 = ExpressionsFactory.eINSTANCE
        .createInclusiveOrExpression();

    ex4.getChildren().add(ex5);

    ExclusiveOrExpression ex6 = ExpressionsFactory.eINSTANCE
        .createExclusiveOrExpression();

    ex5.getChildren().add(ex6);

    AndExpression ex7 = ExpressionsFactory.eINSTANCE.createAndExpression();

    ex6.getChildren().add(ex7);

    EqualityExpression ex8 = ExpressionsFactory.eINSTANCE
        .createEqualityExpression();

    ex7.getChildren().add(ex8);

    RelationExpression ex9 = ExpressionsFactory.eINSTANCE
        .createRelationExpression();

    ex8.getChildren().add(ex9);

    ShiftExpression ex10 = ExpressionsFactory.eINSTANCE
        .createShiftExpression();

    ex9.getChildren().add(ex10);

    AdditiveExpression ex11 = ExpressionsFactory.eINSTANCE
        .createAdditiveExpression();

    ex10.getChildren().add(ex11);

    MultiplicativeExpression ex12 = ExpressionsFactory.eINSTANCE
        .createMultiplicativeExpression();

    ex11.getChildren().add(ex12);

    UnaryExpression ex13 = ExpressionsFactory.eINSTANCE
        .createUnaryExpression();

    ex12.getChildren().add(ex13);

    SuffixUnaryModificationExpression ex14 = ExpressionsFactory.eINSTANCE
        .createSuffixUnaryModificationExpression();

    ex13.setChild(ex14);

    NewProcessingElementCall call = InstantiationsFactory.eINSTANCE
        .createNewProcessingElementCall();

    ex14.setChild(call);

    call.setTypeReference(ref2);

    ref1.setTarget(peDef);
    ref2.setTarget(peDef);

    // VARIABLE:
    LocalVariableStatement statement = StatementsFactory.eINSTANCE
        .createLocalVariableStatement();
View Full Code Here

TOP

Related Classes of eu.admire.dispel.references.DispelTypeReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.