Package org.eclipse.gef.commands

Examples of org.eclipse.gef.commands.Command.execute()


  @Override
  public void run() {
    Command cmd = createCopyCommand(getSelectedObjects());
    if (cmd != null && cmd.canExecute()) {
      cmd.execute();
      // force an updateActions for paste command
      if (getWorkbenchPart().getSite().getPage().getActivePart() instanceof SarosWhiteboardView) {
        ((SarosWhiteboardView) getWorkbenchPart().getSite().getPage()
            .getActivePart()).getEditor().updateSelectionActions();
      } else if (getWorkbenchPart().getSite().getPage().getActivePart() instanceof WhiteboardEditor) {
View Full Code Here


    if (viewer.isInRangeMode()) {
      command = new CopyCommand(viewer);
      command.execute();
    } else {
      Command nodeCopy = new CopyNodeCommand(viewer);
      nodeCopy.execute();
    }
  }

  /*
   * (non-Javadoc)
 
View Full Code Here

    text.setCaretOffset(_location);
    Command command = getCommand(event);
    if (command == null) {
      return;
    }
    command.execute();
  }

  private Command getCommand(DropTargetEvent event) {
    if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
      Object data = event.data;
View Full Code Here

    attributes.put("type", "text/css")//$NON-NLS-1$//$NON-NLS-2$
    Command command = new AddSubNodeCommand(
        PDPlugin.getResourceString("ItemCreationEditPolicy.CommandLabel.CreateItem"),//$NON-NLS-1$
        _parentElement, IHTMLConstants.TAG_LINK, ITLDConstants.URI_HTML,
        attributes);
    command.execute();
  }
}
View Full Code Here

    if (range == null || !range.isValid()) {
      return;
    }
    Command command = getCommand();
    if (command != null) {
      command.execute();
    }
  }

  /**
   * @return the command for this action or null
View Full Code Here

        }
                return super.handleKeyDown(e);
      }
    }
    if (command != null) {
      command.execute();
      e.doit = false;
      if (command instanceof ICaretPositionMover) {
        if (getCurrentViewer() instanceof IHTMLGraphicalViewer) {
          ((IHTMLGraphicalViewer) getCurrentViewer())
              .updateHorizontalPos();
View Full Code Here

      return;
    }
    Command c = new ChangeAttributeCommand(
        PDPlugin
            .getResourceString("AttributePropertySource.CommandLabel.ChangeAttribute"), _element, (String) id, (String) value); //$NON-NLS-1$
    c.execute();
  }

  /**
   * the major job of this wrapper is to provide tag attribute property descriptors
   */
 
View Full Code Here

      return;
    }
    Command c = new ChangeAttributeCommand(
        PDPlugin
            .getResourceString("AttributePropertySource.CommandLabel.ChangeAttribute"), _element, (String) id, (String) value); //$NON-NLS-1$
    c.execute();
  }

  /**
   * the major job of this wrapper is to provide tag attribute property descriptors
   */
 
View Full Code Here

    if (_linkType != null) {
      Request request = new LinkRequest(_linkType, _range);
      Command cmd = _editPart.getCommand(request);
      if (cmd != null && cmd.canExecute()) {
        cmd.execute();
      }
    }

  }
View Full Code Here

            edge.setHighlight(false);
          }
        }
      }

      cmd.execute();
    }

    // restore node highlights
    for (int i = 0; i < getCommands().size(); i++)
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.