Package org.springframework.ide.eclipse.config.graph.model

Examples of org.springframework.ide.eclipse.config.graph.model.StructuredActivity


    }
    return super.getCommand(request);
  }

  protected Command getExplicitChannelCommand() {
    StructuredActivity parent = (StructuredActivity) getHost().getParent().getModel();
    ImplicitChannelModelElement channel = (ImplicitChannelModelElement) getHost().getModel();
    CreateExplicitChannelCommand command = new CreateExplicitChannelCommand(parent.getDiagram().getTextEditor());
    command.setParent(parent);
    command.setChannel(channel);
    return command;
  }
View Full Code Here


    return new NonResizableEditPolicy();
  }

  @Override
  protected Command getCreateCommand(CreateRequest request) {
    StructuredActivity parent = (StructuredActivity) getHost().getModel();
    EditPartViewer viewer = getHost().getViewer();
    CreateCommand command = new CreateCommand(parent.getDiagram().getTextEditor(), viewer);
    command.setParent(parent);
    Activity child = (Activity) request.getNewObject();
    Point location = request.getLocation();
    command.setBounds(putActivityAtLocation(child, location));
    command.setChild(child);
View Full Code Here

   */
  @Override
  protected Command getAddCommand(GroupRequest request) {
    CompoundCommand cmd = new CompoundCommand();
    for (int i = 0; i < request.getEditParts().size(); i++) {
      StructuredActivity parent = (StructuredActivity) getHost().getParent().getModel();
      AddAndAssignSourceCommand add = new AddAndAssignSourceCommand(parent.getDiagram().getTextEditor());
      add.setParent(parent);
      add.setSource((Activity) getHost().getModel());
      add.setChild(((Activity) ((EditPart) request.getEditParts().get(i)).getModel()));
      cmd.add(add);
    }
View Full Code Here

  /**
   * @see ContainerEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
   */
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    StructuredActivity parent = (StructuredActivity) getHost().getParent().getModel();
    CreateAndAssignSourceCommand cmd = new CreateAndAssignSourceCommand(parent.getDiagram().getTextEditor());
    cmd.setParent(parent);
    cmd.setChild((Activity) request.getNewObject());
    cmd.setSource((Activity) getHost().getModel());
    return cmd;
  }
View Full Code Here

  /**
   * @see ComponentEditPolicy#createDeleteCommand(org.eclipse.gef.requests.GroupRequest)
   */
  @Override
  protected Command createDeleteCommand(GroupRequest deleteRequest) {
    StructuredActivity parent = (StructuredActivity) (getHost().getParent().getModel());
    DeleteCommand deleteCmd = new DeleteCommand(parent.getDiagram().getTextEditor());
    deleteCmd.setParent(parent);
    deleteCmd.setChild((Activity) (getHost().getModel()));
    return deleteCmd;
  }
View Full Code Here

  /**
   * @see LayoutEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
   */
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    StructuredActivity parent = (StructuredActivity) getHost().getModel();
    EditPartViewer viewer = getHost().getViewer();
    CreateCommand command = new CreateCommand(parent.getDiagram().getTextEditor(), viewer);
    command.setParent(parent);
    command.setChild((Activity) request.getNewObject());
    return command;
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.config.graph.model.StructuredActivity

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.