Package org.eclipse.ui

Examples of org.eclipse.ui.IActionBars


        toolBar.add(new CollapseAction());
    }

    private void createTopMenu()
    {
        IActionBars bars = getViewSite().getActionBars();
        IMenuManager menu = bars.getMenuManager();
        menu.removeAll();
        for (final IBundleRepository rep : SigilCore.getGlobalRepositoryManager().getRepositories())
        {
            if (treeViewer.getInput() == null)
            {
View Full Code Here


        viewComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    }

    private void createMenu()
    {
        IActionBars action = getViewSite().getActionBars();
        action.getMenuManager().add(
            new ToggleDisplayAction(LINK_LABELS, SHOW_LINK_LABELS, HIDE_LINK_LABELS));
        action.getMenuManager().add(
            new ToggleDisplayAction(LOCAL_LINKS, SHOW_LOCAL_LINKS, HIDE_LOCAL_LINKS));
        action.getMenuManager().add(
            new ToggleDisplayAction(DEPENDENTS, SHOW_DEPENDENTS, HIDE_DEPENDENTS));
        action.getMenuManager().add(
            new ToggleDisplayAction(OPTIONAL, SHOW_OPTIONAL, HIDE_OPTIONAL));
        action.getMenuManager().add(
            new ToggleDisplayAction(SATISFIED, SHOW_SATISFIED, HIDE_SATISFIED));
        action.getMenuManager().add(
            new ToggleDisplayAction(UNSATISFIED, SHOW_UNSATISFIED, HIDE_UNSATISFIED));
        action.updateActionBars();
    }
View Full Code Here

    }
  }

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

    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

        | SWT.V_SCROLL);
    matchText.setLayoutData(data);
    matchText.addFocusListener(new focusListener());

    //set the actions for the global action handler
    IActionBars bars = getViewSite().getActionBars();
    bars.setGlobalActionHandler(ActionFactory.CUT.getId(), cutAction);
    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);

    hookContextMenu();

  }
View Full Code Here

      e.printStackTrace();
    }
  }

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

            }
        });
    }

    private void contributeToActionBars() {
        final IActionBars bars = getViewSite().getActionBars();
        fillLocalPullDown(bars.getMenuManager());
        fillLocalToolBar(bars.getToolBarManager());
    }
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

        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

            }
        }
    }

    protected void createActions() {
        final IActionBars actionBars = getSite().getActionBars();
        // TextViewerAction action = new TextViewerAction(consoleOutputViewer,
        // ITextOperationTarget.SELECT_ALL);
        // action.configureAction(ConsoleMessages.TextConsolePage_SelectAllText,
        // ConsoleMessages.TextConsolePage_SelectAllDescrip,
        // ConsoleMessages.TextConsolePage_SelectAllDescrip);
        // action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL);
        // PlatformUI.getWorkbench().getHelpSystem()
        // .setHelp(action, IConsoleHelpContextIds.CONSOLE_SELECT_ALL_ACTION);
        // setGlobalAction(actionBars, ActionFactory.SELECT_ALL.getId(),
        // action);
        //
        // action = new TextViewerAction(consoleOutputViewer,
        // ITextOperationTarget.CUT);
        // action.configureAction(ConsoleMessages.TextConsolePage_CutText,
        // ConsoleMessages.TextConsolePage_CutDescrip,
        // ConsoleMessages.TextConsolePage_CutDescrip);
        // action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
        // .getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
        // action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT);
        // PlatformUI.getWorkbench().getHelpSystem()
        // .setHelp(action, IConsoleHelpContextIds.CONSOLE_CUT_ACTION);
        // setGlobalAction(actionBars, ActionFactory.CUT.getId(), action);
        //
        // action = new TextViewerAction(consoleOutputViewer,
        // ITextOperationTarget.COPY);
        // action.configureAction(ConsoleMessages.TextConsolePage_CopyText,
        // ConsoleMessages.TextConsolePage_CopyDescrip,
        // ConsoleMessages.TextConsolePage_CopyDescrip);
        // action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
        // .getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
        // action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
        // PlatformUI.getWorkbench().getHelpSystem()
        // .setHelp(action, IConsoleHelpContextIds.CONSOLE_COPY_ACTION);
        // setGlobalAction(actionBars, ActionFactory.COPY.getId(), action);

        // fClearOutputAction = new ClearOutputAction(fConsole);

        final ResourceBundle bundle = ConsoleResourceBundleMessages.getBundle();
        final FindReplaceAction fraction = new FindReplaceAction(bundle,
                "find_replace_action_", fConsoleView); //$NON-NLS-1$
        PlatformUI.getWorkbench().getHelpSystem()
                .setHelp(fraction, IConsoleHelpContextIds.CONSOLE_FIND_REPLACE_ACTION);
        setGlobalAction(actionBars, ActionFactory.FIND.getId(), fraction);

        // fSelectionActions.add(ActionFactory.CUT.getId());
        // fSelectionActions.add(ActionFactory.COPY.getId());
        fSelectionActions.add(ActionFactory.FIND.getId());

        actionBars.updateActionBars();
    }
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.