Package eu.admire.dispel.statements

Examples of eu.admire.dispel.statements.ConnectionStatement


      ConnectionStatementCreateCommand command = new ConnectionStatementCreateCommand(
          request);

      CommandResult result = command.doExecuteWithResult(monitor, info);

      ConnectionStatement statement = (ConnectionStatement) result
          .getReturnValue();

      statement.setExpression(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 {
    ConnectionStatement newElement = StatementsFactory.eINSTANCE
        .createConnectionStatement();

    StatementListContainer owner = (StatementListContainer) getElementToEdit();
    owner.getStatements().add(newElement);

View Full Code Here

  /**
   * @generated
   */
  public static List<DispelLinkDescriptor> getConnectionStatement_2004ContainedLinks(
      View view) {
    ConnectionStatement modelElement = (ConnectionStatement) view
        .getElement();
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    result.addAll(getContainedTypeModelFacetLinks_ConnectionExpression_4001(modelElement));
    return result;
  }
View Full Code Here

  /**
   * @generated
   */
  private static Collection<DispelLinkDescriptor> getOutgoingTypeModelFacetLinks_ConnectionExpression_4001(
      ConnectionEnabledElement source) {
    ConnectionStatement container = null;
    // Find container element for the link.
    // Climb up by containment hierarchy starting from the source
    // and return the first element that is instance of the container class.
    for (EObject element = source; element != null && container == null; element = element
        .eContainer()) {
      if (element instanceof ConnectionStatement) {
        container = (ConnectionStatement) element;
      }
    }
    if (container == null) {
      return Collections.emptyList();
    }
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    ConnectionExpression link = container.getExpression();
    if (ConnectionExpressionEditPart.VISUAL_ID != DispelVisualIDRegistry
        .getLinkWithClassVisualID(link)) {
      return result;
    }
    ConnectionEnabledElement dst = link.getValue();
View Full Code Here

    }
    ConnectionEnabledElement target = getLink().getValue();
    if (!(getLink().eContainer() instanceof ConnectionStatement)) {
      return false;
    }
    ConnectionStatement container = (ConnectionStatement) getLink()
        .eContainer();
    return DispelBaseItemSemanticEditPolicy.getLinkConstraints()
        .canExistConnectionExpression_4001(container, getLink(),
            getNewSource(), target);
  }
View Full Code Here

    }
    ConnectionEnabledElement source = getLink().getChild();
    if (!(getLink().eContainer() instanceof ConnectionStatement)) {
      return false;
    }
    ConnectionStatement container = (ConnectionStatement) getLink()
        .eContainer();
    return DispelBaseItemSemanticEditPolicy.getLinkConstraints()
        .canExistConnectionExpression_4001(container, getLink(),
            source, getNewTarget());
  }
View Full Code Here

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    ConnectionStatement newElement = StatementsFactory.eINSTANCE
        .createConnectionStatement();

    StatementListContainer owner = (StatementListContainer) getElementToEdit();
    owner.getStatements().add(newElement);

View Full Code Here

      ConnectionStatementCreateCommand command = new ConnectionStatementCreateCommand(
          request);

      CommandResult result = command.doExecuteWithResult(monitor, info);

      ConnectionStatement statement = (ConnectionStatement) result
          .getReturnValue();

      statement.setExpression(newElement);

      doConfigure(newElement, monitor, info);
      ((CreateElementRequest) getRequest()).setNewElement(newElement);

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

        ExpressionStatement es = Utility.wrapCI(old);
        Utility.addAsLastNonSubmitStatement(es, pck.getStatements());
      }
     
      //Remove the old connection
      ConnectionStatement cs = (ConnectionStatement) bo;
      EcoreUtil.delete(cs);

       //And add the new one
      mCreateConnFeature.createAndAddConnectionStatement(
          conn.getStart(), conn.getEnd());
View Full Code Here

     */
    public PictogramElement add(IAddContext context) {

        IAddConnectionContext addConContext = (IAddConnectionContext) context;

        ConnectionStatement addedConn =
            (ConnectionStatement) context.getNewObject();
        IPeCreateService peCreateService = Graphiti.getPeCreateService();
       
        // CONNECTION WITH POLYLINE

View Full Code Here

TOP

Related Classes of eu.admire.dispel.statements.ConnectionStatement

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.