Package org.eclipse.ui.handlers

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


    TextViewerAction action = new TextViewerAction(fPatternEditor,
        ITextOperationTarget.UNDO);
    action.setText(PreferencesMessages.EditTemplateDialog_undo);
    fGlobalActions.put(ITextEditorActionConstants.UNDO, action);
    handlerActivations.add(handlerService.activateHandler(
        IWorkbenchActionDefinitionIds.UNDO, new ActionHandler(action),
        expression));

    action = new TextViewerAction(fPatternEditor, ITextOperationTarget.REDO);
    action.setText(PreferencesMessages.EditTemplateDialog_redo);
View Full Code Here


        expression));

    action = new TextViewerAction(fPatternEditor, ITextOperationTarget.REDO);
    action.setText(PreferencesMessages.EditTemplateDialog_redo);
    fGlobalActions.put(ITextEditorActionConstants.REDO, action);
    handlerActivations.add(handlerService.activateHandler(
        IWorkbenchActionDefinitionIds.REDO, new ActionHandler(action),
        expression));

    action = new TextViewerAction(fPatternEditor, ITextOperationTarget.CUT);
    action.setText(PreferencesMessages.EditTemplateDialog_cut);
View Full Code Here

    action = new TextViewerAction(fPatternEditor,
        ISourceViewer.CONTENTASSIST_PROPOSALS);
    action.setText(PreferencesMessages.EditTemplateDialog_content_assist);
    fGlobalActions.put("ContentAssistProposal", action); //$NON-NLS-1$
    handlerActivations.add(handlerService.activateHandler(
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
        new ActionHandler(action), expression));

    fSelectionActions.add(ITextEditorActionConstants.CUT);
    fSelectionActions.add(ITextEditorActionConstants.COPY);
View Full Code Here

    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), fCopyAction);
    bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), fFocusAction);
    bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), fDeleteAction);
   
    IHandlerService handlerService= (IHandlerService) getViewSite().getService(IHandlerService.class);
    handlerService.activateHandler(LINK_WITH_EDITOR_COMMAND_ID, new ActionHandler(fLinkWithEditor));
  }

  private void fillLocalPullDown(IMenuManager manager) {
    for (int i= 0; i < fASTVersionToggleActions.length; i++) {
      manager.add(fASTVersionToggleActions[i])
View Full Code Here

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

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

View Full Code Here

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

View Full Code Here

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

View Full Code Here

  }

  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

    contributeToActionBars();

    // add collapse handler
    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    collapseHandler = new CollapseAllHandler(getSelectionViewer());
    handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, collapseHandler);

    // add DND support
    Transfer[] supportedTransfers = {LocalSelectionTransfer.getTransfer()};
    getSelectionViewer().addDragSupport(DND.DROP_DEFAULT | DND.DROP_COPY | DND.DROP_MOVE, supportedTransfers, new DragSourceAdapter() {
      public void dragSetData(DragSourceEvent event) {
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.