Examples of ExecutionEvent


Examples of org.eclipse.core.commands.ExecutionEvent

          IEditorPart editor = IDE.openEditor(page, file, true);
          ICommandService cmdService = (ICommandService) editor.getSite().getService(ICommandService.class);
          Command format = cmdService.getCommand("org.eclipse.wst.sse.ui.format.document");
          if (format.isDefined()) {
            try {
              format.executeWithChecks(new ExecutionEvent());
            }
            catch(Exception e1){
              }
            }
        } catch (PartInitException e) {
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

  public void setUp()
  {
    this.validator = new Validator();
    this.mockMessageDialogHelper = mock(MessageDialogHelper.class);
    this.validator.setMessageDialogHelper(this.mockMessageDialogHelper);
    this.executionEvent = new ExecutionEvent();
  }
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

      AbstractRebaseCommandHandler action, boolean isEnabled) {
    MenuItem item = new MenuItem(parent, SWT.PUSH);
    item.setImage(image);
    item.setText(itemName);
    item.setEnabled(isEnabled);
    ExecutionEvent event = createExecutionEvent();
    ItemSelectionListener selectionListener = new ItemSelectionListener(
        action, event);
    item.addSelectionListener(selectionListener);
  }
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

        action, event);
    item.addSelectionListener(selectionListener);
  }

  private Repository getRepository() {
    ExecutionEvent event = createExecutionEvent();
    return AbstractSharedCommandHandler.getRepository(event);
  }
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

  public void run(IAction action) {
    if (!shouldRunAction())
      return;

        ExecutionEvent event = createExecutionEvent();

    try {
      this.handler.execute(event);
    } catch (ExecutionException e) {
      Activator.handleError(e.getMessage(), e, true);
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

    IServiceLocator locator = getServiceLocator();
    ICommandService srv = CommonUtils.getService(locator, ICommandService.class);
    IHandlerService hsrv = CommonUtils.getService(locator, IHandlerService.class);
    Command command = srv.getCommand(commandId);

    ExecutionEvent event = hsrv.createExecutionEvent(command, null);
    if (event.getApplicationContext() instanceof IEvaluationContext)
      ((IEvaluationContext) event.getApplicationContext()).addVariable(
          ISources.ACTIVE_CURRENT_SELECTION_NAME, mySelection);
    return event;
  }
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

  public Object execute(ExecutionEvent event) throws ExecutionException {
    final ICommandService cs = (ICommandService) HandlerUtil.getActiveSite(
        event).getService(ICommandService.class);
    final Command command = cs
        .getCommand(IWorkbenchCommandConstants.FILE_IMPORT);
    final ExecutionEvent importEvent = new ExecutionEvent(command,
        Collections.singletonMap("importWizardId", SessionImportWizard.ID), //$NON-NLS-1$
        event.getTrigger(), event.getApplicationContext());
    try {
      command.executeWithChecks(importEvent);
    } catch (CommandException e) {
View Full Code Here

Examples of org.eclipse.core.commands.ExecutionEvent

  public Object execute(ExecutionEvent event) throws ExecutionException {
    final ICommandService cs = (ICommandService) HandlerUtil.getActiveSite(
        event).getService(ICommandService.class);
    final Command command = cs
        .getCommand(IWorkbenchCommandConstants.FILE_EXPORT);
    final ExecutionEvent importEvent = new ExecutionEvent(command,
        Collections.singletonMap("exportWizardId", SessionExportWizard.ID), //$NON-NLS-1$
        event.getTrigger(), event.getApplicationContext());
    try {
      command.executeWithChecks(importEvent);
    } catch (CommandException e) {
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.