Package eu.admire.dispel.core

Examples of eu.admire.dispel.core.ProcessingElementInstance


          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
View Full Code Here


        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

    }
    View containerView = (View) view.eContainer();
    if (!containerView.isSetElement()) {
      return Collections.emptyList();
    }
    ProcessingElementInstance modelElement = (ProcessingElementInstance) containerView
        .getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    for (Iterator<?> it = modelElement.getProcessingElementParameters()
        .iterator(); it.hasNext();) {
      ProcessingElementParameter childElement = (ProcessingElementParameter) it
          .next();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
View Full Code Here

    }
    View containerView = (View) view.eContainer();
    if (!containerView.isSetElement()) {
      return Collections.emptyList();
    }
    ProcessingElementInstance modelElement = (ProcessingElementInstance) containerView
        .getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    for (Iterator<?> it = modelElement.getProcessingElementParameters()
        .iterator(); it.hasNext();) {
      ProcessingElementParameter childElement = (ProcessingElementParameter) it
          .next();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
View Full Code Here

    }
    View containerView = (View) view.eContainer();
    if (!containerView.isSetElement()) {
      return Collections.emptyList();
    }
    ProcessingElementInstance modelElement = (ProcessingElementInstance) containerView
        .getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    {
      //TODO:iFO     
      ProcessingElementDefinition childElement = (ProcessingElementDefinition) modelElement
          .getTypeReference().getTarget();

      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == ProcessingElementMethodDefinitionEditPart.VISUAL_ID) {
View Full Code Here

      eu.admire.dispel.containers.Package pck) {
 
    //Make a copy of the defintion and create our instance object
    ProcessingElementDefinition peDef =
        (ProcessingElementDefinition) EcoreUtil.copy(selectedPE);
    ProcessingElementInstance peInstance =
        (ProcessingElementInstance) peDef.createInstance();

    // PE
    DispelTypeReference ref1 = ReferencesFactory.eINSTANCE
        .createDispelTypeReference();
View Full Code Here

   
   
    ProcessingElementDefinition peDef = (ProcessingElementDefinition) EcoreUtil
        .copy(selectedProcessingElement);

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

    // PE

    DispelTypeReference ref1 = ReferencesFactory.eINSTANCE
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Input newElement = ParametersFactory.eINSTANCE.createInput();

    ProcessingElementInstance owner = (ProcessingElementInstance) getElementToEdit();
    owner.getProcessingElementParameters().add(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
View Full Code Here

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    ProcessingElementInstance newElement = CoreFactory.eINSTANCE
        .createProcessingElementInstance();

    DispelRoot owner = (DispelRoot) getElementToEdit();
    owner.getProcessingElementInstances().add(newElement);

View Full Code Here

      container = out.eContainer();

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

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

        for (LocalVariable var : variables) {

          if (var.getValue() != null && var.getValue().equals(pei)) {

            src1.setTarget(var);
          }
        }

      }

      /*******************************/

      IdentifierReference dst1 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      IdentifierReference dst2 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      dst1.setNext(dst2);

      dst2.setTarget((Input) getTarget());

      Input in = (Input) getTarget();

      container = in.eContainer();

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

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

        for (LocalVariable var : variables) {

          if (var.getValue() != null && var.getValue().equals(pei)) {

            dst1.setTarget(var);
          }
        }

      }

      newElement.setChild(src1);
      newElement.setValue(dst1);

    }

    //TODO iFO following might be buggy!   

    if (getSource() instanceof ConnectionInitialization
        && getTarget() instanceof Input) {

      IdentifierReference dst1 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      IdentifierReference dst2 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      dst1.setNext(dst2);

      dst2.setTarget((Input) getTarget());

      Input in = (Input) getTarget();

      fnc = in.getContainingMethod();

      container = in.eContainer();

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

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

        for (LocalVariable var : variables) {

          if (var.getValue() != null && var.getValue().equals(pei)) {

            dst1.setTarget(var);
          }
        }

      }

      newElement.setChild(getSource());
      newElement.setValue(dst1);
    }

    if (getSource() instanceof Output
        && getTarget() instanceof LocalVariable) {

      IdentifierReference src1 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      IdentifierReference src2 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      src1.setNext(src2);

      src2.setTarget((Output) getSource());

      Output out = (Output) getSource();

      fnc = out.getContainingMethod();

      container = out.eContainer();

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

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

        for (LocalVariable var : variables) {

          if (var.getValue() != null && var.getValue().equals(pei)) {

            src1.setTarget(var);
          }
        }
      }

      IdentifierReference dst1 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      dst1.setTarget((LocalVariable) getTarget());

      newElement.setChild(src1);
      newElement.setValue(dst1);

    }

    if (getSource() instanceof LocalVariable
        && getTarget() instanceof Input) {

      IdentifierReference dst1 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      IdentifierReference dst2 = ReferencesFactory.eINSTANCE
          .createIdentifierReference();

      dst1.setNext(dst2);

      dst2.setTarget((Input) getTarget());

      Input in = (Input) getTarget();

      container = in.eContainer();

      if (container instanceof ProcessingElementInstance) {

        ProcessingElementInstance pei = (ProcessingElementInstance) container;

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

        Collection<LocalVariable> variables = DispelEObjectUtil
View Full Code Here

TOP

Related Classes of eu.admire.dispel.core.ProcessingElementInstance

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.