Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.ExecutionEvent


    final ITextEditor editor = context.mock(ITextEditor.class);
    final IFileEditorInput editorInput = context.mock(IFileEditorInput.class);
    final IDocumentProvider documentProvider = context.mock(IDocumentProvider.class);
    final IDocument document = context.mock(IDocument.class);
   
    ExecutionEvent event = new ExecutionEvent();
    final String contents = "contents";
    final String filename = "filename";
   
    context.checking(new Expectations() {{
      oneOf(editor).getEditorInput(); will(returnValue(editorInput));
View Full Code Here


    }

    @Override
    public final void run(final IAction action) {
        try {
            execute(new ExecutionEvent());
        } catch (final ExecutionException e) {
            // Do nothing. Maybe show error message?
        }
    }
View Full Code Here

      if (actionDefinitionId==null
          || !applicabilityChecker.isApplicable(action)) {
        return;
      }
      Command command = commandManager.getCommand(actionDefinitionId);
      ExecutionEvent executionEvent = new ExecutionEvent(command,
          Collections.EMPTY_MAP, event, null);

      commandManager.firePreExecute(actionDefinitionId, executionEvent);
    }
View Full Code Here

  protected CommandEvent createEventDiff(DateTime dateTime) {
    return new CommandEvent(dateTime, createExecutionEvent("23545656"));
  }

  private ExecutionEvent createExecutionEvent(String commandId) {
    return new ExecutionEvent(getCommandService().getCommand(commandId),
        Collections.EMPTY_MAP, null, null);
  }
View Full Code Here

  protected CommandTracker createTracker() {
    return new CommandTracker();
  }

  private ExecutionEvent createExecutionEvent(String commandId) {
    return new ExecutionEvent(getCommandService().getCommand(commandId),
        Collections.emptyMap(), null, null);
  }
View Full Code Here

  private CommandEvent createEvent() {
    return new CommandEvent(new DateTime(), createExecutionEvent("adnk2o385"));
  }

  private ExecutionEvent createExecutionEvent(String commandId) {
    return new ExecutionEvent(getCommandService().getCommand(commandId),
        Collections.EMPTY_MAP, null, null);
  }
View Full Code Here

   *            action
   * @see org.eclipse.ui.IActionDelegate#run(IAction)
   */
  public void run(final IAction action) {
    try {
      execute(new ExecutionEvent());
    } catch (final ExecutionException e) {
      // TODO Do something meaningful and poignant.
    }
  }
View Full Code Here

    runWithEvent(null);
  }

  public final void runWithEvent(final Event event) {
    final Command baseCommand = command.getCommand();
    final ExecutionEvent executionEvent = new ExecutionEvent(command
        .getCommand(), command.getParameterMap(), event, null);
    try {
      baseCommand.execute(executionEvent);
      firePropertyChange(IAction.RESULT, null, Boolean.TRUE);
View Full Code Here

    handlerAuthority.addSourceProvider(provider);
  }

  public final ExecutionEvent createExecutionEvent(final Command command,
      final Event event) {
    return new ExecutionEvent(command, null, event, getCurrentState());
  }
View Full Code Here

    return new ExecutionEvent(command, null, event, getCurrentState());
  }

  public ExecutionEvent createExecutionEvent(
      final ParameterizedCommand command, final Event event) {
    return new ExecutionEvent(command.getCommand(), command
        .getParameterMap(), event, getCurrentState());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.ExecutionEvent

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.