Examples of IMenuManager


Examples of org.eclipse.jface.action.IMenuManager

        // create actions and context menu (and register global actions)
        actionGroup = new ConnectionViewActionGroup( this );
        actionGroup.fillToolBar( mainWidget.getToolBarManager() );
        actionGroup.fillMenu( mainWidget.getMenuManager() );
        actionGroup.enableGlobalActionHandlers( getViewSite().getActionBars() );
        IMenuManager contextMenuManager = configuration.getContextMenuManager( mainWidget.getViewer() );
        actionGroup.fillContextMenu( contextMenuManager );
        getSite().registerContextMenu( ( MenuManager ) contextMenuManager, mainWidget.getViewer() );

        // create the listener
        getSite().setSelectionProvider( mainWidget.getViewer() );
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    /**
     * Initializes the Menu.
     */
    private void initMenu()
    {
        IMenuManager menu = view.getViewSite().getActionBars().getMenuManager();
        menu.add( showTypeHierarchy );
        menu.add( showSupertypeHierarchy );
        menu.add( showSubtypeHierarchy );
        menu.add( new Separator() );
        menu.add( linkWithEditor );
        menu.add( new Separator() );
        menu.add( openPreferencePage );
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

        mapContainer.setBackground(CodemapCore.getPlugin().getColorScheme().getWaterColor().asSWTColor(Display.getDefault()));
    }

    private void configureActionBar() {
        IActionBars actionBars = getViewSite().getActionBars();
        IMenuManager viewMenu = actionBars.getMenuManager();
        viewMenu.add(new Separator());
        viewMenu.add(new SaveAsPNGAction(theController));
        viewMenu.add(new ReloadMapAction(theController));
        viewMenu.add(new SaveHapaxDataAction(theController));       
        try {
            viewMenu.add(new CodemapRosterMenuItem());
        } catch (NoClassDefFoundError e) {
           
        }
//        viewMenu.add(new DebugLocationsAction());
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    }

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

            RepositoryAction action = new RepositoryAction(rep);
            menu.add(action);
        }
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    colorTable.add(new Color(display, 214, 179, 74));
    colorTable.add(new Color(display, 204, 74, 214));
  }

  private void createShortcutsMenu(IMenuManager mgr) {
    IMenuManager submenu = new MenuManager("Shortcuts");
    mgr.add(submenu);

    Action shortcut;

    try {
       InputStream is = getClass().getResourceAsStream(SHORTCUTS_FILE);
     
      BufferedReader br = new BufferedReader(new InputStreamReader(is));

      String line;

      while ((line = br.readLine()) != null) {
        StringTokenizer st = new StringTokenizer(line, "\t");

        if (st.countTokens() == 2) {

          final String shortc = st.nextToken();
          String descr = st.nextToken();

          shortcut = new Action() {
            public void run() {
              insertShortcut(shortc);
            }
          };

          shortcut.setText(shortc + " - " + descr);
          submenu.add(shortcut);
          //}

          mgr.update(true);
        } else if (st.countTokens() == 1) {
          String token = st.nextToken();
          if (token.equals("<DEL>")) {
            submenu.add(new Separator());
          }
        }
      }
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

                ErlElementSorter.SORT_ON_NAME), new ErlElementSorter(
                ErlElementSorter.SORT_ON_EXPORT), null, false, ErlideUIPlugin
                .getDefault().getPreferenceStore());
        toolBarManager.add(fSortAction);

        final IMenuManager viewMenuManager = actionBars.getMenuManager();
        fToggleLinkingAction = new ToggleLinkingAction();
        fToggleLinkingAction
                .setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);
        viewMenuManager.add(fToggleLinkingAction);
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

        }
    }

    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

Examples of org.eclipse.jface.action.IMenuManager

        if (!(resource instanceof IFile)) {
            return;
        }

        // Create a menu.
        final IMenuManager submenu = new MenuManager(ActionMessages.OpenWithMenu_label);
        submenu.add(new OpenWithMenu(fSite.getPage(), (IFile) resource));

        // Add the submenu.
        menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu);
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    private final GotoAnnotationAction fNextAnnotation;

    @Override
    public void contributeToMenu(final IMenuManager menuManager) {
        final IMenuManager navigateMenu = menuManager
                .findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
        if (navigateMenu != null) {
            // navigateMenu.add(new Separator());
            // navigateMenu.add(fQuickOutline);
        }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

            file = ((IErlSource) element).getFile();
        } else if (element instanceof IFile) {
            file = (IFile) element;
        }
        if (file != null) {
            final IMenuManager submenu = new MenuManager("Open Wit&h");
            submenu.add(new OpenWithMenu(getPage(), file));

            menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN_WITH, submenu);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.