Package eu.admire.dispel.variables

Examples of eu.admire.dispel.variables.LocalVariable


    // VARIABLE:
    LocalVariableStatement statement = StatementsFactory.eINSTANCE
        .createLocalVariableStatement();

    LocalVariable variable = VariablesFactory.eINSTANCE
        .createLocalVariable();

    statement.setVariable(variable);

    variable.setTypeReference(ref1);
    variable.setName("new_variable");
    variable.setInitialValue(ex1);

    variable.setValue(peInstance);

    // iFOnew

    ArrayList<DispelType> tDefinitions = new ArrayList<DispelType>(
        pck.getTypeDefinitions());
View Full Code Here


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetVariable(LocalVariable newVariable, NotificationChain msgs) {
    LocalVariable oldVariable = variable;
    variable = newVariable;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StatementsPackage.LOCAL_VARIABLE_STATEMENT__VARIABLE, oldVariable, newVariable);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

        LocalVariable inVar = (LocalVariable) getSource();
        fnc = inVar.getContainingMethod();

        Collection<LocalVariable> variables = DispelEObjectUtil
            .getObjectsByType(fnc.eAllContents(),
                VariablesPackage.eINSTANCE.getLocalVariable());
View Full Code Here

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    LocalVariable newElement = VariablesFactory.eINSTANCE
        .createLocalVariable();

    LocalVariableStatement owner = (LocalVariableStatement) getElementToEdit();
    owner.setVariable(newElement);

View Full Code Here

            NamedElement el = (NamedElement) ref2.getTarget();

            String name = el.getName();

            LocalVariable var = (LocalVariable) ref.getTarget();

            if (var.getValue() instanceof ProcessingElementInstance) {

              ProcessingElementInstance inst = (ProcessingElementInstance) var
                  .getValue();

              if (inst != null) {

                for (ProcessingElementParameter pp : inst
                    .getProcessingElementParameters()) {

                  if (pp.getName().equals(name)
                      && pp instanceof Output) {

                    ref2.setTarget(pp);
                  }
                }
              }
            }
          }
        }
      }
         
     
   
      if (exp.getValue() instanceof IdentifierReference) {

        IdentifierReference ref = (IdentifierReference) exp.getValue();

        if (ref.getNext() instanceof IdentifierReference) {

          IdentifierReference ref2 = (IdentifierReference) ref
              .getNext();
         
          if (ref2.getTarget() instanceof NamedElement) {

            NamedElement el = (NamedElement) ref2.getTarget();

            String name = el.getName();

            LocalVariable var = (LocalVariable) ref.getTarget();

            if (var.getValue() instanceof ProcessingElementInstance) {

              ProcessingElementInstance inst = (ProcessingElementInstance) var
                  .getValue();

              if (inst != null) {

                for (ProcessingElementParameter pp : inst
View Full Code Here

    for (IdentifierReference ref1 : references) {

      if (ref1.getTarget() instanceof LocalVariable
          && ref1.getNext() instanceof IdentifierReference) {

        LocalVariable var = (LocalVariable) ref1.getTarget();

        IdentifierReference ref2 = (IdentifierReference) ref1.getNext();

        if (ref2.getTarget() instanceof ProcessingElementParameter) {

          ProcessingElementParameter par = (ProcessingElementParameter) ref2
              .getTarget();

          String parameterName = par.getName();

          if (var.getValue() instanceof ProcessingElementInstance) {

            ProcessingElementInstance peiIn = (ProcessingElementInstance) var
                .getValue();

            if (peiIn != null) {

              boolean isThere = false;
View Full Code Here

  public static List<DispelNodeDescriptor> getLocalVariable_3001SemanticChildren(
      View view) {
    if (!view.isSetElement()) {
      return Collections.emptyList();
    }
    LocalVariable modelElement = (LocalVariable) view.getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    {
      Expression childElement = modelElement.getInitialValue();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == BooleanLiteralEditPart.VISUAL_ID) {
        result.add(new DispelNodeDescriptor(childElement, visualID));
      }
View Full Code Here

    }
    LocalVariableStatement modelElement = (LocalVariableStatement) containerView
        .getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    {
      LocalVariable childElement = modelElement.getVariable();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == LocalVariableEditPart.VISUAL_ID) {
        result.add(new DispelNodeDescriptor(childElement, visualID));
      }
View Full Code Here

    }
    View containerView = (View) view.eContainer();
    if (!containerView.isSetElement()) {
      return Collections.emptyList();
    }
    LocalVariable modelElement = (LocalVariable) containerView.getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    {
      Expression childElement = modelElement.getInitialValue();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == StringReferenceEditPart.VISUAL_ID) {
        result.add(new DispelNodeDescriptor(childElement, visualID));
      }
    }
    {

      //TODO: iFO     

      ProcessingElementInstance childElement = (ProcessingElementInstance) modelElement
          .getValue();

      if (childElement != null) {

        int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
View Full Code Here

  /**
   * @generated
   */
  public static List<DispelLinkDescriptor> getLocalVariable_3001IncomingLinks(
      View view) {
    LocalVariable modelElement = (LocalVariable) view.getElement();
    Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
        .find(view.eResource().getResourceSet().getResources());
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    result.addAll(getIncomingTypeModelFacetLinks_ConnectionExpression_4001(
        modelElement, crossReferences));
View Full Code Here

TOP

Related Classes of eu.admire.dispel.variables.LocalVariable

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.