Examples of executeWithChecks()


Examples of org.eclipse.core.commands.Command.executeWithChecks()

      final Event trigger) throws ExecutionException,
      NotDefinedException, NotEnabledException, NotHandledException {
    final Command command = commandService.getCommand(commandId);
    final ExecutionEvent event = new ExecutionEvent(command,
        Collections.EMPTY_MAP, trigger, getCurrentState());
    return command.executeWithChecks(event);
  }

  public final IEvaluationContext getCurrentState() {
    return handlerAuthority.getCurrentState();
  }
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

        Command upgradeCommand = cmdService.getCommand(IDestecsUiConstants.UPGRADE_LIBRARY_COMMANDID);
        if (upgradeCommand.isDefined())
        {
          try
          {
            upgradeCommand.executeWithChecks(event);
          } catch (Exception e)
          {
            DestecsUIPlugin.log("Could not execute library upgrade command", e);
          }
        }
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

        .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 (ExecutionException e) {
      throw e;
    } catch (CommandException e) {
      EclEmmaUIPlugin.log(e);
    }
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

        .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 (ExecutionException e) {
      throw e;
    } catch (CommandException e) {
      EclEmmaUIPlugin.log(e);
    }
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

          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.Command.executeWithChecks()

          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.Command.executeWithChecks()

      return null;

    ICommandService srv = CommonUtils.getService(getServiceLocator(), ICommandService.class);
    Command command = srv.getCommand(commandId);
    try {
      return command.executeWithChecks(event);
    } catch (ExecutionException e) {
      Activator.handleError(e.getMessage(), e, true);
    } catch (NotDefinedException e) {
      Activator.handleError(e.getMessage(), e, true);
    } catch (NotEnabledException e) {
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

        .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) {
      EclEmmaUIPlugin.log(e);
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.core.commands.Command.executeWithChecks()

        .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) {
      EclEmmaUIPlugin.log(e);
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.core.commands.ParameterizedCommand.executeWithChecks()

      return false;
    }

    try {
      ParameterizedCommand pCommand = commandService.deserialize(command);
      pCommand.executeWithChecks(null, handlerService.getCurrentState());

      // Executed command successfully. Now set intro standby if needed.
      if (standbyState == null)
        return true;
      return setStandbyState(standbyState);
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.