Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.AbstractHandler


            fViewer.getDocument().addDocumentListener(fDocumentListener);
            final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
            gd.heightHint = fPage.convertHeightInCharsToPixels(10);
            gd.widthHint = fPage.convertWidthInCharsToPixels(40);
            fViewer.getControl().setLayoutData(gd);
            fHandler = new AbstractHandler() {
                @Override
                public Object execute(final ExecutionEvent event)
                        throws org.eclipse.core.commands.ExecutionException {
                    fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
                    return null;
View Full Code Here


    return new ExecutionEvent(getCommandService().getCommand(commandId),
        Collections.emptyMap(), null, null);
  }

  private IHandler createHandler() {
    return new AbstractHandler() {
      @Override
      public Object execute(ExecutionEvent event) throws ExecutionException {
        return null;
      }
    };
View Full Code Here

    
     * @param context
     */
    static synchronized void enableClearBlackboardCommand( final IToolContext context ) {
        if (clearEditBlackboardHandler == null) {
            clearEditBlackboardHandler = new AbstractHandler(){

                public Object execute( ExecutionEvent event ) throws ExecutionException {
                    Tool tool = ApplicationGIS.getToolManager().getActiveTool();

                    if (tool instanceof AbstractEditTool) {
View Full Code Here

  private void activateHandler() {
    IHandlerService handlerService= (IHandlerService)PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
    if (handlerService == null)
      return;
   
    IHandler handler= new AbstractHandler() {
      public Object execute(ExecutionEvent event) throws ExecutionException {
        if (ContentAssistHandler.this.isEnabled()) // don't call AbstractHandler#isEnabled()!
          fContentAssistant.showPossibleCompletions();
        return null;
      }
View Full Code Here

   * should be created.
   */
  void checkCreatePinEditorShortcutKeyHandler() {
    if (pinEditorHandlerActivation == null) {
      final Shell shell = window.getShell();
      final IHandler pinEditorHandler = new AbstractHandler() {
        public final Object execute(final ExecutionEvent event) {
          // check if the "Close editors automatically" preference is
          // set
          IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
          if (store
View Full Code Here

  private void activateHandler() {
    IHandlerService handlerService= (IHandlerService)PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
    if (handlerService == null)
      return;

    IHandler handler= new AbstractHandler() {
      public Object execute(ExecutionEvent event) throws ExecutionException {
        if (ContentAssistHandler.this.isEnabled()) // don't call AbstractHandler#isEnabled()!
          fContentAssistant.showPossibleCompletions();
        return null;
      }
View Full Code Here

        .getCommand(COMMAND_ID_DUMMY_COME_BACK_LATER);
    this.dummyCommandComeBackLater.define(
        SharedFileFinder.TITLE_SHARED_FILES_LATER,
        SharedFileFinder.MESSAGE_SHARED_FILES_LATER,
        this.getLazyInitCategory(commandService));
    this.dummyCommandComeBackLater.setHandler(new AbstractHandler()
    {
      @Override
      public Object execute(ExecutionEvent event) throws ExecutionException
      {
        getPluginContext().getMessageDialogHelper().displayInformationMessage(
View Full Code Here

    IHandlerService getHandlerService() {
        return (IHandlerService) getViewSite().getService(IHandlerService.class);
    }

    private void installEvalTopLevelSExpressionCommand() {
        getHandlerService().activateHandler(IClojureEditorActionDefinitionIds.EVALUATE_TOP_LEVEL_S_EXPRESSION, new AbstractHandler() {
        @Override
      public Object execute(ExecutionEvent event) throws ExecutionException {
          evalExpression();
          return null;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.AbstractHandler

Copyright © 2018 www.massapicom. 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.