Examples of activateHandler()


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

   
    Command command = commandService.getCommand("io.emmet.eclipse.commands." + item.getId());
    command.define(item.getName(), "", commandService.getCategory("io.emmet.eclipse.commands.category"));
   
    IHandlerService handlerService = (IHandlerService) serviceLocator.getService(IHandlerService.class);
    handlerService.activateHandler(command.getId(), handlerFactory(item.getId()));
   
    CommandContributionItemParameter p = new CommandContributionItemParameter(
        serviceLocator, "", command.getId(), CommandContributionItem.STYLE_PUSH);
   
    p.label = item.getName();
View Full Code Here

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

      String id = (String) ob;
      if (!id.startsWith(COMMAND_PREFIX)) {
        continue;
      }
     
      handlerService.activateHandler(id, new CorrectionCommandHandler());
    }
  }
 
 
  /*
 
View Full Code Here

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

        final IHandlerService handlerService = (IHandlerService) site
                .getService(IHandlerService.class);
        final IContextService contextService = (IContextService) site
                .getService(IContextService.class);
        fActivatedContext = contextService.activateContext(fContextId);
        fActivatedHandler = handlerService.activateHandler(
                "org.eclipse.debug.ui.commands.eof", fEOFHandler); //$NON-NLS-1$
    }

    @Override
    public void deactivated() {
View Full Code Here

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

                editor.getAction(ITextEditorActionConstants.REDO));
        fActionGroups.fillActionBars(actionBars);
        registerToolbarActions(actionBars);
        final IHandlerService handlerService = (IHandlerService) site
                .getService(IHandlerService.class);
        handlerService.activateHandler(
                IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR,
                new ActionHandler(fToggleLinkingAction));
        fPartListener = new IPartListener() {

            @Override
View Full Code Here

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

    final String commandId = command.getId();
    final IHandlerService service = (IHandlerService) window
        .getService(IHandlerService.class);
    final IHandlerActivation handlerActivation;
    if (activeWhenExpression == null) {
      handlerActivation = service.activateHandler(commandId, handler);
    } else {
      handlerActivation = service.activateHandler(commandId, handler,
          activeWhenExpression);
    }
    handlerActivations.add(handlerActivation);
View Full Code Here

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

        .getService(IHandlerService.class);
    final IHandlerActivation handlerActivation;
    if (activeWhenExpression == null) {
      handlerActivation = service.activateHandler(commandId, handler);
    } else {
      handlerActivation = service.activateHandler(commandId, handler,
          activeWhenExpression);
    }
    handlerActivations.add(handlerActivation);
  }
View Full Code Here

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

          Expression handlerExpression = EXPRESSION;
          //XXX add new API in next release to avoid down-casting (bug 137091)
          if (this instanceof EditorActionBars) {
            handlerExpression = ((EditorActionBars)this).getHandlerExpression();
          }
          final IHandlerActivation activation = service
              .activateHandler(commandId, actionHandler,
                  handlerExpression);
          activationsByActionId.put(actionID, activation);
        }
      }
View Full Code Here

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

         */
        private void registerKeybindings(IAction action) {
            final IHandler handler = new ActionHandler(action);
            final IHandlerService handlerService = (IHandlerService) PlatformUI
                    .getWorkbench().getAdapter(IHandlerService.class);
            final IHandlerActivation activation = handlerService.activateHandler(
                    action.getActionDefinitionId(), handler);
//                    new ActiveShellExpression(dialog.getShell()),
//                    ISources.ACTIVE_SHELL);
            activations.add(activation);
        }
View Full Code Here

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

        if (ContentAssistHandler.this.isEnabled()) // don't call AbstractHandler#isEnabled()!
          fContentAssistant.showPossibleCompletions();
        return null;
      }
    };
    fHandlerActivation= handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, handler);
  }

  /**
   * Unregister the {@link IHandlerActivation} from the shell.
   */
 
View Full Code Here

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

        IContextService ctx = (IContextService) getSite().getService(IContextService.class);
        ctx.activateContext("gefEditor.context");
  }
    private void activateHandler(String actionId) {
        IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
        handlerService.activateHandler(actionId, new ActionHandler(getActionRegistry().getAction(actionId)));
    }

  @Override
    public CommandStack getCommandStack() {
        return super.getCommandStack();
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.