Package org.eclipse.ui

Examples of org.eclipse.ui.IActionBars


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

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


        renderer.setSeriesPaint(0, Color.black);

        new ChartComposite(parent, SWT.None, result);

        Action action = new ExportChartData();
        IActionBars actionBars = getViewSite().getActionBars();
        IMenuManager dropDownMenu = actionBars.getMenuManager();
        dropDownMenu.add(action);
    }
View Full Code Here

    /**
     * We use this method to contribute some global actions from the ToolManager and hook up a
     * custom delete action that is willing to delete a layer.
     */
    private void setGlobalActions() {
        IActionBars actionBars = getViewSite().getActionBars();

        IToolManager toolManager = ApplicationGIS.getToolManager();
        toolManager.contributeGlobalActions(this, actionBars);
        toolManager.registerActionsWithPart(this);

        IKeyBindingService keyBindings = getSite().getKeyBindingService();
        IAction delAction = getDeleteAction();
        actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), delAction);
        keyBindings.registerAction(delAction);
    }
View Full Code Here

      if (parent != null)
        parent.remove(root);
      IEditorSite site = editor.getEditorSite();
      undoAction = new UndoActionHandler(site, getUndoContext());
      redoAction = new RedoActionHandler(site, getUndoContext());
      IActionBars actionBars = site.getActionBars();
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
      actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
      rootBounds = adapter.getDesignBounds();
      root.setSize(rootBounds.width, rootBounds.height);
      add(root);
      root.setVisible(true);
      designBorder = adapter.getDesignBorder();
View Full Code Here

    {
  }
   
    private void createActions()
    {
        IActionBars actionBars = ((IViewSite) getSite()).getActionBars();
        ResourceBundle bundle = PerlDocViewMessages.getBundle();

        findReplaceAction =
            new FindReplaceAction(bundle, "find_replace_action_", this);
        actionBars.setGlobalActionHandler(
            ActionFactory.FIND.getId(),
            findReplaceAction);

        actionBars.updateActionBars();
    }
View Full Code Here

    ITextEditor textEditor= null;
    if (part instanceof ITextEditor)
      textEditor= (ITextEditor) part;

    /** The global actions to be connected with editor actions */
    IActionBars actionBars= getActionBars();
   
    actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), getAction(textEditor, IDEActionFactory.ADD_TASK.getId()));
    actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(textEditor, IDEActionFactory.BOOKMARK.getId()));
   
    IAction action= getAction(textEditor, ITextEditorActionConstants.NEXT);
    actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, action);
    actionBars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, action);
    action= getAction(textEditor, ITextEditorActionConstants.PREVIOUS);
    actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, action);
    actionBars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, action);

    action= getAction(textEditor, ActionFactory.REFRESH.getId());
    actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), action);

    fChangeEncodingAction.setAction(getAction(textEditor, ITextEditorActionConstants.CHANGE_ENCODING));
   
    IAction quickAssistAction= getAction(textEditor, ITextEditorActionConstants.QUICK_ASSIST);
    fQuickAssistAction.setAction(quickAssistAction);
View Full Code Here

    }

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

    IActionBars actionBars= getActionBars();
    for (int i= 0; i < ACTIONS.length; i++)
      actionBars.setGlobalActionHandler(ACTIONS[i], getAction(editor, ACTIONS[i]));
    actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS, getAction(editor, ITextEditorActionConstants.SHOW_WHITESPACE_CHARACTERS));

    fFindNext.setAction(getAction(editor, ITextEditorActionConstants.FIND_NEXT));
    fFindPrevious.setAction(getAction(editor, ITextEditorActionConstants.FIND_PREVIOUS));
    fIncrementalFind.setAction(getAction(editor, ITextEditorActionConstants.FIND_INCREMENTAL));
    fIncrementalFindReverse.setAction(getAction(editor, ITextEditorActionConstants.FIND_INCREMENTAL_REVERSE));
View Full Code Here

    // we don't want other plugin's to contribute
    // getSite().registerContextMenu(menuMgr, viewer);
  }

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

    if (oldAction instanceof OperationHistoryActionHandler)
      ((OperationHistoryActionHandler)oldAction).dispose();

    setAction(actionId, action);
   
    IActionBars actionBars= getEditorSite().getActionBars();
    if (actionBars != null)
      actionBars.setGlobalActionHandler(actionId, action);
  }
View Full Code Here

    }

    private void setupToolbar() {

        // toolbars
        IActionBars bars = getViewSite().getActionBars();
        IToolBarManager tbm = bars.getToolBarManager();

        // add actions to the bar
        tbm.add(createCampaignAction);

        // tbm.add(createCampaignItemAction);
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.