Examples of IHandler


Examples of org.eclipse.core.commands.IHandler

   * @see org.eclipse.jface.text.contentassist.ICompletionListener#assistSessionStarted(org.eclipse.jface.text.contentassist.ContentAssistEvent)
   * @since 3.4
   */
  public void assistSessionStarted(ContentAssistEvent event) {
    ICommandService commandService= (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
    IHandler handler= getHandler(ContentAssistant.SELECT_NEXT_PROPOSAL_COMMAND_ID);
    fReplacedCommands= new ArrayList(10);
    fReplacedCommands.add(new ReplacedCommand(ITextEditorActionDefinitionIds.LINE_DOWN, handler, commandService));
    handler= getHandler(ContentAssistant.SELECT_PREVIOUS_PROPOSAL_COMMAND_ID);
    fReplacedCommands.add(new ReplacedCommand(ITextEditorActionDefinitionIds.LINE_UP, handler, commandService));
    fReplacedCommands.add(new ReplacedCommand(ITextEditorActionDefinitionIds.LINE_START, commandService));
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

  }

  private void activateHandler(CommandConfig commandConfig, String commandId)
  {
    IHandlerService handlerService = (IHandlerService) getHandlerService(getServiceLocator());
    IHandler handler = this.createHandlerForCustomCommand(commandConfig);
    IHandlerActivation handlerActivation = handlerService.activateHandler(
        commandId, handler);
    this.setHandlerActivationInCommandConfig(commandConfig, handlerActivation);
  }
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

    {
        IHandlerService handlerService = ( IHandlerService ) PlatformUI.getWorkbench().getAdapter(
            IHandlerService.class );
        if ( handlerService != null )
        {
            IHandler handler = new org.eclipse.core.commands.AbstractHandler()
            {
                public Object execute( ExecutionEvent event ) throws org.eclipse.core.commands.ExecutionException
                {
                    showPossibleCompletions();
                    return null;
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

    {
        ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
            ICommandService.class );
        if ( commandService != null )
        {
            IHandler handler = commandService.getCommand( action.getActionDefinitionId() ).getHandler();
            if ( handler instanceof ActionHandler )
            {
                ActionHandler actionHandler = ( ActionHandler ) handler;
                if ( actionHandler != null && actionHandler.getAction() == action )
                {
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

    {
        IHandlerService handlerService = ( IHandlerService ) PlatformUI.getWorkbench().getAdapter(
            IHandlerService.class );
        if ( handlerService != null )
        {
            IHandler handler = new org.eclipse.core.commands.AbstractHandler()
            {
                public Object execute( ExecutionEvent event ) throws org.eclipse.core.commands.ExecutionException
                {
                    showPossibleCompletions();
                    return null;
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

    }
  }

  protected void activateHandler(int operation, String actionDefinitionId) {
    StyledText textWidget = textViewer.getTextWidget();
    IHandler actionHandler = createActionHandler(operation,
        actionDefinitionId);
    IHandlerActivation handlerActivation = handlerService.activateHandler(
        actionDefinitionId, actionHandler,
        new ActiveFocusControlExpression(textWidget));
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

   */
  public final IHandler getHandler(String commandId) {
    if (fHandlers == null)
      throw new IllegalStateException();

    IHandler handler= (IHandler)fHandlers.get(commandId);
    if (handler != null)
      return handler;

    Assert.isLegal(false);
    return null;
View Full Code Here

Examples of org.eclipse.core.commands.IHandler

   * @param operation
   * @param actionDefinitionId
   */
  protected void activateHandler(int operation, String actionDefinitionId) {
    StyledText textWidget = textViewer.getTextWidget();
    IHandler actionHandler = createActionHandler(operation,
        actionDefinitionId);
    IHandlerActivation handlerActivation = handlerService.activateHandler(
        actionDefinitionId, actionHandler,
        new ActiveFocusControlExpression(textWidget));

View Full Code Here

Examples of org.eclipse.core.commands.IHandler

      if(handlerActivation != null) {
        handlerService.deactivateHandler(handlerActivation);
        handlerActivation = null;
      }
     
      IHandler handler = getHandler(part);
      if(handler != null) {
        handlerActivation = handlerService.activateHandler(commandId, handler);
      }
    }
View Full Code Here

Examples of org.eclipse.ui.commands.IHandler

                active = true;
                parent.deactivateNestedService();
            }

            // Create the new submission
            IHandler handler = new ActionHandler(action);
            HandlerSubmission handlerSubmission = new HandlerSubmission(null,
                    workbenchPartSite.getShell(), workbenchPartSite, commandId,
                    handler, Priority.MEDIUM);
            handlerSubmissionsByCommandId.put(commandId, handlerSubmission);
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.