Examples of activateHandler()


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

   */
    public final void activateHandler() {
    if (handlerActivation == null) {
      final IHandler handler = new ShowViewHandler(getId());
      final IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
      handlerActivation = handlerService
          .activateHandler(getId(), handler);
    }
    }
 
  /**
 
View Full Code Here

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

                {
                    showPossibleCompletions();
                    return null;
                }
            };
            handlerActivation = handlerService.activateHandler(
                ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, handler );
        }
    }

View Full Code Here

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

                {
                    showPossibleCompletions();
                    return null;
                }
            };
            this.handlerActivation = handlerService.activateHandler(
                ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, handler );
        }
    }

View Full Code Here

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

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

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

      for (Iterator iterator = handlersByCommandId.entrySet().iterator(); iterator
          .hasNext();) {
        Map.Entry entry = (Map.Entry) iterator.next();
        String commandId = (String) entry.getKey();
        IHandler handler = (IHandler) entry.getValue();
        newHandlers.add(handlerService.activateHandler(commandId,
            handler, expression));
      }
    }

    handlerActivations = newHandlers;
View Full Code Here

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

    if (!command.isDefined()) {
      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()

  }

  private void activateHandler(String id, IHandler handler) {
    final IHandlerService hs = (IHandlerService) getSite().getService(
        IHandlerService.class);
    hs.activateHandler(id, handler);
    handlers.add(handler);
  }

  private void createActions() {
    // For the following commands we use actions, as they are already available
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()

          handlerService.deactivateHandlers(handlerActivations);
        }

        public void focusGained(FocusEvent e) {
          IAction action= (IAction)fGlobalActions.get(ITextEditorActionConstants.REDO);
          handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_REDO, new ActionHandler(action), expression));
          action= (IAction)fGlobalActions.get(ITextEditorActionConstants.UNDO);
          handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_UNDO, new ActionHandler(action), expression));
          action= (IAction)fGlobalActions.get(ITextEditorActionConstants.CONTENT_ASSIST);
          handlerActivations.add(handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(action), expression));
        }
View Full Code Here

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

        public void focusGained(FocusEvent e) {
          IAction action= (IAction)fGlobalActions.get(ITextEditorActionConstants.REDO);
          handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_REDO, new ActionHandler(action), expression));
          action= (IAction)fGlobalActions.get(ITextEditorActionConstants.UNDO);
          handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_UNDO, new ActionHandler(action), expression));
          action= (IAction)fGlobalActions.get(ITextEditorActionConstants.CONTENT_ASSIST);
          handlerActivations.add(handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(action), expression));
        }
      });
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.