Package org.eclipse.ui

Examples of org.eclipse.ui.IActionBars


        DebugUITools.getDebugContextManager()
                .getContextService(fPage.getSite().getWorkbenchWindow())
                .addDebugContextListener(this);

        // contribute to toolbar
        final IActionBars actionBars = fPage.getSite().getActionBars();
        configureToolBar(actionBars.getToolBarManager());

        // create handler and submissions for EOF
        fEOFHandler = new EOFHandler();
    }
View Full Code Here


        site.registerContextMenu(ErlangCore.PLUGIN_ID + ".outline", manager,
                fOutlineViewer);
        fActionGroups = new CompositeActionGroup(
                new ActionGroup[] { new ErlangSearchActionGroup(this) });
        // register global actions
        final IActionBars actionBars = site.getActionBars();
        actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO,
                editor.getAction(ITextEditorActionConstants.UNDO));
        actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO,
                editor.getAction(ITextEditorActionConstants.REDO));
        fActionGroups.fillActionBars(actionBars);
        registerToolbarActions(actionBars);
        final IHandlerService handlerService = (IHandlerService) site
                .getService(IHandlerService.class);
View Full Code Here

            ErlLogger.warn(e);
        }
    }

    private void initToolbar() {
        final IActionBars actionBars = getViewSite().getActionBars();
        final IMenuManager dropDownMenu = actionBars.getMenuManager();
        final IToolBarManager toolBar = actionBars.getToolBarManager();

        final Action action = new ClearTestResultsAction(treeViewer, events);
        dropDownMenu.add(action);
        toolBar.add(action);
    }
View Full Code Here

        // "Comment"));
        // bars.setGlobalActionHandler(ErlangActionIds.UNCOMMENT,
        // getAction(editor,
        // "Uncomment"));

        final IActionBars actionBars = getActionBars();
        final IStatusLineManager manager = actionBars.getStatusLineManager();
        manager.setMessage(null);
        manager.setErrorMessage(null);

        fPreviousAnnotation.setEditor(editor);
        fNextAnnotation.setEditor(editor);

        final IAction showOutline = getAction(editor,
                IErlangEditorActionDefinitionIds.SHOW_OUTLINE);
        actionBars.setGlobalActionHandler(IErlangEditorActionDefinitionIds.SHOW_OUTLINE,
                showOutline);

    }
View Full Code Here

        viewer.getControl().setMenu(menu);
        getSite().registerContextMenu(menuMgr, viewer);
    }

    private void contributeToActionBars() {
        final IActionBars bars = getViewSite().getActionBars();
        fillLocalPullDown(bars.getMenuManager());
        fillLocalToolBar(bars.getToolBarManager());
    }
View Full Code Here

                .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

    }

    private void hookGlobalActions() {
        final IActionBars bars = getViewSite().getActionBars();
        bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), fRemoveAction);
        viewer.getControl().addKeyListener(new KeyAdapter() {
            @Override
            public void keyPressed(final KeyEvent event) {
                if (event.character == SWT.DEL && event.stateMask == 0
                        && fRemoveAction.isEnabled()) {
View Full Code Here

  public void setActivePage(IEditorPart part)
  {
    contributor.setActiveEditor(part);
    getActionBars().updateActionBars();
   
    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

      ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;
     
      actionBars.setGlobalActionHandler(
        ActionFactory.DELETE.getId(),
        getAction(editor, ITextEditorActionConstants.DELETE));
      actionBars.setGlobalActionHandler(
        ActionFactory.UNDO.getId(),
        getAction(editor, ITextEditorActionConstants.UNDO));
      actionBars.setGlobalActionHandler(
        ActionFactory.REDO.getId(),
        getAction(editor, ITextEditorActionConstants.REDO));
      actionBars.setGlobalActionHandler(
        ActionFactory.CUT.getId(),
        getAction(editor, ITextEditorActionConstants.CUT));
      actionBars.setGlobalActionHandler(
        ActionFactory.COPY.getId(),
        getAction(editor, ITextEditorActionConstants.COPY));
      actionBars.setGlobalActionHandler(
        ActionFactory.PASTE.getId(),
        getAction(editor, ITextEditorActionConstants.PASTE));
      actionBars.setGlobalActionHandler(
        ActionFactory.SELECT_ALL.getId(),
        getAction(editor, ITextEditorActionConstants.SELECT_ALL));
      actionBars.setGlobalActionHandler(
        ActionFactory.FIND.getId(),
        getAction(editor, ITextEditorActionConstants.FIND));
      actionBars.setGlobalActionHandler(
        IDEActionFactory.BOOKMARK.getId(),
        getAction(editor, IDEActionFactory.BOOKMARK.getId()));
      actionBars.setGlobalActionHandler(
          "RulerDoubleClick",
          getAction(editor, ITextEditorActionConstants.RULER_DOUBLE_CLICK));
     
      actionBars.updateActionBars();
    }
  }
View Full Code Here

            return;
        }

        activeEditorPart = part;

        IActionBars actionBars = getActionBars();
        if (actionBars != null) {

            ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

            actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor,
                ITextEditorActionConstants.DELETE));
            actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor,
                ITextEditorActionConstants.UNDO));
            actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor,
                ITextEditorActionConstants.REDO));
            actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor,
                ITextEditorActionConstants.CUT));
            actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor,
                ITextEditorActionConstants.COPY));
            actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor,
                ITextEditorActionConstants.PASTE));
            actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor,
                ITextEditorActionConstants.SELECT_ALL));
            actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor,
                ITextEditorActionConstants.FIND));
            actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor,
                IDEActionFactory.BOOKMARK.getId()));
            actionBars.updateActionBars();
        }
    }
View Full Code Here

        viewer.getControl().setMenu(menu);
        getSite().registerContextMenu(menuMgr, viewer);
    }

    private void contributeToActionBars() {
        IActionBars bars = getViewSite().getActionBars();
        bars.getMenuManager().add(toolbarZoomContributionViewItem);
        fillLocalPullDown(bars.getMenuManager());
        fillLocalToolBar(bars.getToolBarManager());
    }
View Full Code Here

    getSite().registerContextMenu(menuMgr, textViewer);
  }
 
  private void contributeToActionBars()
  {
    IActionBars bars = getViewSite().getActionBars();
   
    fillLocalToolBar(bars.getToolBarManager());
      fillLocalPullDown(bars.getMenuManager());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IActionBars

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.