Package org.eclipse.ui.handlers

Examples of org.eclipse.ui.handlers.IHandlerService.executeCommand()


        context.addVariable(ActionHelper.ME_TO_OPEN_EVALUATIONCONTEXT_VARIABLE, model);

        try
        {
          context.addVariable(ActionHelper.MECONTEXT_EVALUATIONCONTEXT_VARIABLE, ECPWorkspaceManager.getInstance().getWorkSpace().getProject(model));
            handlerService.executeCommand(ActionHelper.MEEDITOR_OPENMODELELEMENT_COMMAND_ID, null);
        }
        catch (ExecutionException e)
        {
          DialogHandler.showExceptionDialog(e);
        }
View Full Code Here


        // }*/
        // Command command = cmdService.getCommand(this.id);
        // if (!command.isDefined())
        // return;
        try {
            handlerService.executeCommand(this.id, null);
        } catch (ExecutionException e) {
            e.printStackTrace();
        } catch (NotDefinedException e) {
            e.printStackTrace();
        } catch (NotEnabledException e) {
View Full Code Here

                IHandlerService service = (IHandlerService) PlatformUI
                    .getWorkbench().getActiveWorkbenchWindow().getActivePage()
                    .getActivePart().getSite()
                    .getService(IHandlerService.class);
                try {
                    service
                        .executeCommand(
                            "de.fu_berlin.inf.dpp.ui.commands.OpenSarosPreferences", //$NON-NLS-1$
                            null);
                } catch (Exception e) {
                    log.debug("Could execute command", e); //$NON-NLS-1$
View Full Code Here

            ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, parameters);

            IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench()
                    .getService(IHandlerService.class);
            try {
                handlerService.executeCommand(parameterizedCommand, null);
            } catch (ExecutionException ex) {
//                StatusManager.getManager().handle(new Status(IStatus.ERROR, ApplicationPlugin.PLUGIN_ID, ex.getMessage(), ex));
            } catch (NotDefinedException ex) {
//                StatusManager.getManager().handle(new Status(IStatus.ERROR, ApplicationPlugin.PLUGIN_ID, ex.getMessage(), ex));
            } catch (NotEnabledException ex) {
View Full Code Here

      active = false;

      IHandlerService handlerService = (IHandlerService) this.view
          .getSite().getService(IHandlerService.class);
      try {
        handlerService.executeCommand(CallEditorHandler.CALL_EDITOR_ID,
            null);
      } catch (Exception ex) {

        MessageDialog.showUnexpectedErrorMessage(
            "Failed to call handler with ID "
View Full Code Here

    viewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        IHandlerService handlerService = (IHandlerService) getSite()
            .getService(IHandlerService.class);
        try {
          handlerService.executeCommand("SyncYourSecrets.callEditor",
              null);
        } catch (Exception ex) {
          throw new RuntimeException(
              "SyncYourSecrets.callEditor not found");
        }
View Full Code Here

    }

    IHandlerService handlerService = (IHandlerService) workbenchWindow
        .getService(IHandlerService.class);
    try {
      handlerService.executeCommand(getActionDefinitionId(),
          null);
    } catch (Exception e) {
      WorkbenchPlugin.log(e);
    }
  }
View Full Code Here

        .getActiveWorkbenchWindow();
    if (window != null) {
      IHandlerService handlerService = (IHandlerService) window
          .getWorkbench().getService(IHandlerService.class);
      try {
        handlerService.executeCommand(command, null);
      } catch (Exception ex) {
        StatusUtil.handleStatus(ex, StatusManager.SHOW
            | StatusManager.LOG);
      }
    }
View Full Code Here

          public void handleEvent(Event event) {
            // Lets call our command
            IHandlerService handlerService = (IHandlerService) window
                .getService(IHandlerService.class);
            try {
              handlerService.executeCommand(COMMAND_ID, null);
            } catch (Exception ex) {
              throw new RuntimeException(COMMAND_ID);
            }
          }
        });
View Full Code Here

      @Override
      public void open(OpenEvent event) {
        IHandlerService handlerService =
          (IHandlerService) getSite().getService(IHandlerService.class);
        try {
          handlerService.executeCommand(
              "net.sf.logsaw.ui.commands.OpenLogResourceCommand", //$NON-NLS-1$
              null);
        } catch (CommandException e) {
          // log and show error
          UIPlugin.logAndShowError(new CoreException(new Status(
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.