Package org.eclipse.ui

Examples of org.eclipse.ui.IActionBars


    }

    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


    }

    private void setupToolbar() {

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

        // add actions to the bar
        tbm.add(addParticipantAction);
        tbm.add(removeParticipantAction);
View Full Code Here

        getSite().registerContextMenu(menuMgr, viewer);
    }

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

        });
       
        createActions();
       
        // toolbars
        IActionBars bars = getViewSite().getActionBars();
        bars.getToolBarManager().add(createCampaignAction);
        bars.getToolBarManager().add(deleteCampaignItemAction);
        bars.getToolBarManager().add(toggleDMItemsAction);
        bars.getToolBarManager().add(toggleMechanicsItemsAction);

        MenuManager menuMgr = new MenuManager("#PopupMenu");
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(new IMenuListener() {
            public void menuAboutToShow(IMenuManager manager)
View Full Code Here

    }

    private void setupToolbar() {

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

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

        // TODO
View Full Code Here

    }

    private void setupToolbar()
    {
        // toolbars
        IActionBars bars = getViewSite().getActionBars();
        IToolBarManager tbm = bars.getToolBarManager();

        // add actions to the bar
        tbm.add(createCampaignItemAction);
        tbm.add(deleteCampaignItemAction);
        tbm.add(new Separator());
View Full Code Here

    }

    private void setupToolbar() {

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

        // add actions to the bar
        tbm.add(removeAlertAction);
        tbm.add(clearAlertsAction);
View Full Code Here

    undoAction = new UndoActionHandler(this.page.getActivePart().getSite(),
        editor.getUndoContext());
    redoAction = new RedoActionHandler(this.page.getActivePart().getSite(),
        editor.getUndoContext());

    IActionBars actionBars = getActionBars();
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
        undoAction);
    actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
        redoAction);
  }
View Full Code Here

        // The editor has changed so we need to swap the UndoRedoManager instance
        // with the current global UNDO/REDO actions.
        if (currentEditor != null) {
            ODOMEditorContext odomEditorContext = currentEditor.getODOMEditorContext();
            UndoRedoManager newManager = odomEditorContext.getUndoRedoManager();
            IActionBars actionBars = odomEditorContext.getActionBars();

            // Ensure that the current action for UNDO/REDO has been created
            // and assigned to the global action handler. Thus ensuring
            // only one UNDO and one REDO action is created.
            updateManagerForAction(actionBars, newManager,
View Full Code Here

        // Set up a focus listener for maintaining global actions.
        categoriesComposite.getTreeViewer().getControl().
                addFocusListener(new FocusListener() {
                    public void focusGained(FocusEvent event) {
                        IActionBars actionBars = DeviceDefinitionPoliciesSection.this.
                                context.getActionBars();
                        origDelete = actionBars.
                                getGlobalActionHandler(IWorkbenchActionConstants.DELETE);
                        actionBars.setGlobalActionHandler(IWorkbenchActionConstants.DELETE,
                                deletePolicyAction);
                        actionBars.updateActionBars();
                    }

                    public void focusLost(FocusEvent event) {
                        IActionBars actionBars = DeviceDefinitionPoliciesSection.this.
                                context.getActionBars();
                        actionBars.setGlobalActionHandler(IWorkbenchActionConstants.DELETE,
                                origDelete);
                        actionBars.updateActionBars();
                    }
                });

        // We use the selection manager for event handling because it allows
        // use to use filters which we need for resolving category elements
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.