コード例 #1
0
 /**
  * Adds actions for "go back", "go home", and "go into" to a tool bar manager.
  *
  * @param toolBar is the target manager to update
  */
 public void addNavigationActions(IToolBarManager toolBar) {
   createActions();
   toolBar.add(homeAction);
   toolBar.add(backAction);
   toolBar.add(forwardAction);
   updateNavigationButtons();
 }
コード例 #2
0
ファイル: NotesPopup.java プロジェクト: Bluelich/xmind
 public void fillToolBar(IToolBarManager toolbar) {
   super.fillToolBar(toolbar);
   if (showGotoNotesView) {
     toolbar.add(new Separator());
     toolbar.add(new GotoNotesViewAction());
   }
 }
コード例 #3
0
ファイル: GameView.java プロジェクト: fogleman/WordWarrior
 private void createToolbar() {
   IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
   toolbar.add(done);
   toolbar.add(change);
   toolbar.add(pass);
   toolbar.add(challenge);
 }
コード例 #4
0
  public void placeActions() {
    IActionBars actionBars = getViewSite().getActionBars();

    IMenuManager mm = actionBars.getMenuManager();
    mm.removeAll();
    mm.add(SaveTreeViewAction.getAction(getSite().getShell()));
    mm.add(CapturePSDAction.getAction(getSite().getShell()));
    mm.add(new Separator());
    mm.add(RefreshViewAction.getAction());
    mm.add(DisplayViewAction.getAction(getSite().getShell()));
    mm.add(new Separator());
    mm.add(InvalidateAction.getAction());
    mm.add(RequestLayoutAction.getAction());
    mm.add(DumpDisplayListAction.getAction());
    mm.add(ProfileNodesAction.getAction());

    IToolBarManager tm = actionBars.getToolBarManager();
    tm.removeAll();
    tm.add(SaveTreeViewAction.getAction(getSite().getShell()));
    tm.add(CapturePSDAction.getAction(getSite().getShell()));
    tm.add(new Separator());
    tm.add(RefreshViewAction.getAction());
    tm.add(DisplayViewAction.getAction(getSite().getShell()));
    tm.add(new Separator());
    tm.add(InvalidateAction.getAction());
    tm.add(RequestLayoutAction.getAction());
    tm.add(DumpDisplayListAction.getAction());
    tm.add(ProfileNodesAction.getAction());
  }
コード例 #5
0
 /**
  * Create the GUI.
  *
  * @param frame The Composite handle of parent
  */
 @Override
 public void createPartControl(final Composite frame) {
   imageCanvas = new SWTImageCanvas(frame);
   final IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
   mgr.add(new SaveImageAction());
   mgr.add(new SaveDOTAction());
 }
コード例 #6
0
 /** Creates the toolbar GUI contributions */
 private void createToolbar() {
   IToolBarManager tm = getViewSite().getActionBars().getToolBarManager();
   tm.add(refresh);
   group.fillActionBars(getViewSite().getActionBars());
   tm.add(showRoot);
   tm.add(zoom);
 }
コード例 #7
0
 public void contributeToToolBar(IToolBarManager toolBarManager) {
   toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
   toolBarManager.add(getAction(ActionFactory.REDO.getId()));
   toolBarManager.add(getAction(ActionFactory.DELETE.getId()));
   toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN));
   toolBarManager.add(new ZoomComboContributionItem(getPage()));
   toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT));
 }
コード例 #8
0
 protected void fillCoolBar(ICoolBarManager coolBar) {
   IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
   coolBar.add(new ToolBarContributionItem(toolbar, "main"));
   toolbar.add(openDbConnectionViewAction);
   toolbar.add(openRepositoriesViewAction);
   toolbar.add(openSoftwareInstalledViewAction);
   // toolbar.add(messagePopupAction);
 }
コード例 #9
0
  private void fillLocalToolBar(IToolBarManager manager) {

    manager.add(action1);
    manager.add(action2);
    manager.add(new Separator());

    drillDownAdapter.addNavigationActions(manager);
  }
コード例 #10
0
 private void fillLocalToolBar() {
   IActionBars bars = getViewSite().getActionBars();
   IToolBarManager manager = bars.getToolBarManager();
   manager.add(this.refreshAction);
   manager.add(this.addTemplateAction);
   manager.add(this.editTemplateAction);
   manager.add(this.deleteTemplateAction);
 }
コード例 #11
0
ファイル: DevicesView.java プロジェクト: TencentOpen/GT
 /** 初始化工具栏 */
 private void createLocalToolBar() {
   IActionBars bars = getViewSite().getActionBars();
   IToolBarManager manager = bars.getToolBarManager();
   manager.add(testAction);
   manager.add(refreshAction);
   manager.add(openLogWithChartAction);
   manager.add(openResultDirAction);
 }
コード例 #12
0
 private void fillLocalToolBar(IToolBarManager manager) {
   manager.add(fCodeSelectAction);
   manager.add(fElementAtAction);
   manager.add(fResetAction);
   manager.add(fRefreshAction);
   manager.add(new Separator());
   fDrillDownAdapter.addNavigationActions(manager);
 }
コード例 #13
0
ファイル: SimulationView.java プロジェクト: huybuidac/yakindu
 protected void hookActions() {
   IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
   IAction collapse = new CollapseAllAction(viewer);
   mgr.add(collapse);
   IAction expand = new ExpandAllAction(viewer);
   mgr.add(expand);
   IAction hideTimeEvent = new HideTimeEventsAction(true);
   mgr.add(hideTimeEvent);
 }
コード例 #14
0
 /**
  * Init the toolbar for the receiver
  *
  * <p>You can override this method if you want - but remember to call <code>super.initToolBar()
  * </code>.
  *
  * @param manager the tool bar manager of this view
  */
 private void initToolBar(IToolBarManager manager) {
   if (expandAllAction != null) manager.add(expandAllAction);
   if (collapseAllAction != null) manager.add(collapseAllAction);
   if (hideShowColAction != null) manager.add(hideShowColAction);
   if (exportToCSVAction != null) manager.add(exportToCSVAction);
   if (sortAction != null) manager.add(sortAction);
   contributeToToolbar(manager);
   manager.update(true);
 }
コード例 #15
0
ファイル: ViewMenus.java プロジェクト: zdavatz/elexis
 /**
  * Create a toolbar containing the specified actions
  *
  * @param actions a collection of actions and null-values (that represent separators)
  */
 public void createToolbar(IAction... actions) {
   IToolBarManager tmg = site.getActionBars().getToolBarManager();
   for (IAction ac : actions) {
     if (ac == null) {
       tmg.add(new Separator());
     } else {
       tmg.add(ac);
     }
   }
 }
コード例 #16
0
ファイル: PVariableView.java プロジェクト: rolandschulz/PTP
  /* (non-Javadoc)
   * @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
   */
  protected void configureToolBar(IToolBarManager toolBarMgr) {
    toolBarMgr.add(new Separator(IPTPDebugUIConstants.VAR_GROUP));

    toolBarMgr.appendToGroup(IPTPDebugUIConstants.VAR_GROUP, getAction(AddPExpressionAction.name));
    toolBarMgr.appendToGroup(IPTPDebugUIConstants.VAR_GROUP, getAction(EditPExpressionAction.name));
    toolBarMgr.appendToGroup(
        IPTPDebugUIConstants.VAR_GROUP, getAction(DeletePExpressionAction.name));
    toolBarMgr.appendToGroup(
        IPTPDebugUIConstants.VAR_GROUP, getAction(UpdatePExpressionAction.name));
    toolBarMgr.add(new Separator());
    toolBarMgr.appendToGroup(IPTPDebugUIConstants.VAR_GROUP, getAction(CompareValueAction.name));
  }
コード例 #17
0
  @Override
  public void contributeToToolBar(IToolBarManager toolBarManager) {
    logger.debug("contributeToToolBar() activeEditor = " + activeEditor); // $NON-NLS-1$
    super.contributeToToolBar(toolBarManager);

    printLayoutFromViewerAction =
        new PrintLayoutFromViewerAction((ReportViewerEditor) activeEditor);
    refreshLayoutFromViewerAction =
        new RefreshLayoutFromViewerAction((ReportViewerEditor) activeEditor);
    toolBarManager.add(printLayoutFromViewerAction);
    toolBarManager.add(refreshLayoutFromViewerAction);
  }
コード例 #18
0
  /** Adds the actions in this group and its subgroups to the action bars. */
  public void fillActionBars(IActionBars actionBars) {
    actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertyDialogAction);

    IToolBarManager toolBar = actionBars.getToolBarManager();
    drillDownAdapter.addNavigationActions(toolBar);
    toolBar.add(new Separator());
    toolBar.add(this.collapseAllAction);
    toolBar.add(this.refreshAction);

    IMenuManager menu = actionBars.getMenuManager();
    menu.add(new Separator());
    menu.add(this.refreshAction);
  }
コード例 #19
0
ファイル: TaskTableView.java プロジェクト: merks/cdo
 private void initializeToolBar() {
   IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
   toolbarManager.add(searchAction = new TaskSearchAction());
   toolbarManager.add(new Separator());
   toolbarManager.add(showEnhancements = new TaskFilterAction("Enhancements", "green.gif"));
   toolbarManager.add(showBugs = new TaskFilterAction("Bugs", "red.gif"));
   toolbarManager.add(showAmbiguous = new TaskFilterAction("Ambiguous", "yellow.gif"));
   toolbarManager.add(new Separator());
   toolbarManager.add(showOpen = new TaskFilterAction("Open", "open.gif"));
   toolbarManager.add(showFixed = new TaskFilterAction("Fixed", "fixed.gif", false));
   toolbarManager.add(new Separator());
   toolbarManager.add(new TaskRefreshAction());
 }
コード例 #20
0
  // this should be called each time the current component is changed OR the tab inside a component
  // is changed
  void fillToolBar(ViewersMultiSandboxViewComponent c) {
    // add items for the multi operation

    IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
    mgr.removeAll();
    mgr.add(getSwitchSashingAction);
    mgr.add(getAddNewComponentAction);
    mgr.add(getCloseCurrentComponentAction);
    mgr.add(new Separator());

    c.fillToolBarBasedOnCurrentTab();

    getViewSite().getActionBars().updateActionBars();
  }
コード例 #21
0
ファイル: SearchView.java プロジェクト: hyamamoto/dart
 /**
  * Creates the groups and separators for the search view's tool bar
  *
  * @param toolbar the toolbar
  */
 public static void createToolBarGroups(IToolBarManager toolbar) {
   toolbar.add(new Separator(IContextMenuConstants.GROUP_NEW));
   toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_SHOW));
   toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_OPEN));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_BUILD));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_REORGANIZE));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_EDIT));
   toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_REMOVE_MATCHES));
   toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_GENERATE));
   toolbar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_VIEWER_SETUP));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_PROPERTIES));
   toolbar.add(new Separator(IContextMenuConstants.GROUP_SEARCH));
 }
コード例 #22
0
  @Override
  protected void fillCoolBar(ICoolBarManager coolBar) {
    super.fillCoolBar(coolBar);

    /*
     * File-related toolbar actions
     */

    final IToolBarManager fileToolBar = new ToolBarManager(coolBar.getStyle());
    fileToolBar.add(saveAsAction);
    fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

    coolBar.add(fileToolBar);
  }
コード例 #23
0
ファイル: AlarmTreeView.java プロジェクト: Crisam/cs-studio
 /**
  * Adds the tool bar actions.
  *
  * @param manager the menu manager.
  */
 private void fillLocalToolBar(@Nonnull final IToolBarManager manager) {
   manager.add(_toggleFilterAction);
   manager.add(new Separator());
   manager.add(_showPropertyViewAction);
   manager.add(_showMessageAreaAction);
   manager.add(_saveInLdapAction);
   manager.add(_remoteReloadAction);
   manager.add(_reloadAction);
   manager.add(new Separator());
   manager.add(_importXmlFileAction);
   manager.add(_exportXmlFileAction);
 }
コード例 #24
0
 public void createPartControl(Composite parent) {
   super.createPartControl(parent);
   IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
   man.add(
       new OpenPTPairAllAction2(
           getViewSite().getWorkbenchWindow(), "Load", serverId, objType, counter1, counter2));
 }
コード例 #25
0
  /**
   * The <code>PropertySheet</code> implementation of this <code>IWorkbenchPart</code> method
   * creates a <code>PageBook</code> control with its default page showing.
   */
  public void createPartControl(Composite parent) {
    super.createPartControl(parent);

    pinPropertySheetAction.addPropertyChangeListener(
        new IPropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent event) {
            if (IAction.CHECKED.equals(event.getProperty())) {
              updateContentDescription();
            }
          }
        });
    IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
    menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    menuManager.add(pinPropertySheetAction);

    IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
    menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    toolBarManager.add(pinPropertySheetAction);

    getSite()
        .getPage()
        .getWorkbenchWindow()
        .getWorkbench()
        .getHelpSystem()
        .setHelp(getPageBook(), IPropertiesHelpContextIds.PROPERTY_SHEET_VIEW);
  }
コード例 #26
0
ファイル: DotGraphView.java プロジェクト: seok86/gef4
 private void add(Action action, String imageName) {
   action.setId(action.getText());
   action.setImageDescriptor(
       PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageName));
   IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
   mgr.add(action);
 }
コード例 #27
0
  /* (non-Javadoc)
   * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
   */
  public void setActionBars(IActionBars actionBars) {
    super.setActionBars(actionBars);
    IToolBarManager toolBarManager = actionBars.getToolBarManager();

    LexicalSortingAction action = new LexicalSortingAction(getTreeViewer());
    toolBarManager.add(action);
  }
コード例 #28
0
ファイル: FormDialog.java プロジェクト: pkeller/passerelle
  @Override
  protected void createFormContent(IManagedForm mform) {
    mform.getForm().setText("Properties");
    final ScrolledForm form = mform.getForm();
    FormToolkit toolkit = new FormToolkit(getShell().getDisplay());

    GridLayout layout = new GridLayout();
    form.getBody().setLayout(layout);

    final String href = getHelpResource();
    if (href != null) {
      IToolBarManager manager = form.getToolBarManager();
      Action helpAction = new Action("help") { // $NON-NLS-1$
            public void run() {
              BusyIndicator.showWhile(
                  form.getDisplay(),
                  new Runnable() {
                    public void run() {
                      PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
                    }
                  });
            }
          };
      helpAction.setToolTipText(PDEUIMessages.PDEFormPage_help);
      helpAction.setImageDescriptor(PDEPluginImages.DESC_HELP);
      manager.add(helpAction);
      form.updateToolBar();
    }
  }
コード例 #29
0
ファイル: MembersView.java プロジェクト: sleetish/vjet
 protected void fillToolBar(IToolBarManager tbm) {
   // Add by Oliver. 2009-08-17. This toolbar menu is to sort the members
   // sequence. Before the import segment is at the bottom of this view.
   // Now we can control the display sequence by this action.
   tbm.add(new LexicalSortingAction());
   fMemberFilterActionGroup.contributeToToolBar(tbm);
   super.fillToolBar(tbm);
 }
コード例 #30
0
 @Override
 public void contributeToToolBar(IToolBarManager manager) {
   manager.add(new Separator());
   // manager.add(executeSqlAction);
   // String[] zoomStrings = new String[] { ZoomManager.FIT_ALL,
   // ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
   // manager.add(new ZoomComboContributionItem(getPage(), zoomStrings));
 }