Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.MenuManager


        menuManager.add( new Separator() );

        // navigation
        menuManager.add( searchResultEditorActionMap.get( locateDnInDitAction ) );
        menuManager.add( searchResultEditorActionMap.get( openSearchResultAction ) );
        MenuManager schemaMenuManager = new MenuManager( Messages
            .getString( "SearchResultEditorActionGroup.OpenSchemaBrowser" ) ); //$NON-NLS-1$
        schemaMenuManager.add( searchResultEditorActionMap.get( showOcdAction ) );
        schemaMenuManager.add( searchResultEditorActionMap.get( showAtdAction ) );
        schemaMenuManager.add( searchResultEditorActionMap.get( showEqualityMrdAction ) );
        schemaMenuManager.add( searchResultEditorActionMap.get( showSubstringMrdAction ) );
        schemaMenuManager.add( searchResultEditorActionMap.get( showOrderingMrdAction ) );
        schemaMenuManager.add( searchResultEditorActionMap.get( showLsdAction ) );
        menuManager.add( schemaMenuManager );
        MenuManager showInSubMenu = new MenuManager( Messages.getString( "SearchResultEditorActionGroup.ShowIn" ) ); //$NON-NLS-1$
        showInSubMenu.add( ContributionItemFactory.VIEWS_SHOW_IN.create( PlatformUI.getWorkbench()
            .getActiveWorkbenchWindow() ) );
        menuManager.add( showInSubMenu );
        menuManager.add( new Separator() );

        // copy, paste, delete
        menuManager.add( searchResultEditorActionMap.get( copyAction ) );
        menuManager.add( searchResultEditorActionMap.get( pasteAction ) );
        menuManager.add( searchResultEditorActionMap.get( deleteAction ) );
        MenuManager advancedMenuManager = new MenuManager( Messages
            .getString( "SearchResultEditorActionGroup.Advanced" ) ); //$NON-NLS-1$
        advancedMenuManager.add( searchResultEditorActionMap.get( copyDnAction ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyUrlAction ) );
        advancedMenuManager.add( new Separator() );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyAttriuteDescriptionAction ) );
        advancedMenuManager.add( new Separator() );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyDisplayValueAction ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueUtf8Action ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueBase64Action ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueHexAction ) );
        advancedMenuManager.add( new Separator() );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueAsLdifAction ) );
        advancedMenuManager.add( new Separator() );
        advancedMenuManager.add( searchResultEditorActionMap.get( copySearchFilterAction ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyNotSearchFilterAction ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyAndSearchFilterAction ) );
        advancedMenuManager.add( searchResultEditorActionMap.get( copyOrSearchFilterAction ) );
        menuManager.add( advancedMenuManager );
        menuManager.add( new Separator() );

        // edit
        menuManager.add( openDefaultValueEditorActionProxy );
        MenuManager editorMenuManager = new MenuManager( Messages.getString( "SearchResultEditorActionGroup.EditValue" ) ); //$NON-NLS-1$
        if ( openBestValueEditorActionProxy.isEnabled() )
        {
            editorMenuManager.add( openBestValueEditorActionProxy );
            editorMenuManager.add( new Separator() );
        }
        for ( int i = 0; i < openValueEditorActionProxies.length; i++ )
        {
            if ( openValueEditorActionProxies[i].isEnabled()
                && ( ( OpenEditorAction ) openValueEditorActionProxies[i].getAction() ).getValueEditor().getClass() != ( ( OpenBestEditorAction ) openBestValueEditorActionProxy
                    .getAction() ).getBestValueEditor().getClass() )
            {
                editorMenuManager.add( openValueEditorActionProxies[i] );
            }
        }
        editorMenuManager.add( new Separator() );
        editorMenuManager.add( openValueEditorPreferencesAction );
        menuManager.add( editorMenuManager );
        menuManager.add( openEntryValueEditorActionProxy );
        menuManager.add( new Separator() );

        // refresh
View Full Code Here


     */
    public IMenuManager getContextMenuManager( TableViewer viewer )
    {
        if ( contextMenuManager == null )
        {
            contextMenuManager = new MenuManager();
            Menu menu = contextMenuManager.createContextMenu( viewer.getControl() );
            getCursor( viewer ).setMenu( menu );
        }
        return contextMenuManager;
    }
View Full Code Here

       
        updateBackgroundColors();

        canvas = new Canvas(mapContainer, SWT.DOUBLE_BUFFERED);
        hoverShell = new HoverShell(canvas);
        MenuManager menuMgr= new MenuManager();
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(menuListener);
        Menu menu = menuMgr.createContextMenu(canvas);
        canvas.setMenu(menu);
        getSite().registerContextMenu(menuMgr, theController.getSelectionProvider());       
        canvasListener = new CanvasListener(canvas);
       
        composite.layout();
View Full Code Here

    contribItem.setVisible(true);
    return contribItem;
  }
 
  private IContributionItem createContributionItem(IServiceLocator serviceLocator, Menu item) {
    MenuManager submenu = new MenuManager(item.getName(), null);
   
    for (AbstractMenuItem subitem : item.getItems()) {
      submenu.add(createContributionItem(serviceLocator, subitem));
    }
   
    return submenu;
  }
View Full Code Here

    // Do not create toolbar and menu if there is only one or less actions
    // in the given actionlist
    if (actions != null && actions.size() > 1) {

      final MenuManager viewMenuManager = new MenuManager();

      ToolBarManager manager = createToolBarManager(buttonComposite);
      toolBar = manager.getControl();

      viewMenuButton = new ToolItem(toolBar, SWT.PUSH, 0);

      viewMenuButton.setImage(CloudFoundryImages.getImage(CloudFoundryImages.MENU_VIEW_ENABLED));
      viewMenuButton.setDisabledImage(CloudFoundryImages.getImage(CloudFoundryImages.MENU_VIEW_DISABLED));

      viewMenuButton.setToolTipText(Messages.ApplicationActionMenuControl_TEXT_SELECT_MODE);
      viewMenuButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
          showViewMenu(viewMenuManager, toolBar);
        }
      });

      for (ApplicationAction action : actions) {
        viewMenuManager.add(new MenuAction(action));
      }
    }

    setVisible(true);
View Full Code Here

    }
    return descriptors;
  }

  protected void addTableActions() {
    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        List<CaldecottTunnelDescriptor> descriptors = getSelectedCaldecotTunnelDescriptors();
        List<IAction> actions = getViewerActions(descriptors);
        if (actions != null) {
          for (IAction action : actions) {
            manager.add(action);
          }
        }

      }
    });

    Menu menu = menuManager.createContextMenu(getViewer().getControl());
    getViewer().getControl().setMenu(menu);

  }
View Full Code Here

    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer() };
    ApplicationViewersDropAdapter listener = new ApplicationViewersDropAdapter(applicationsViewer);
    applicationsViewer.addDropSupport(ops, transfers, listener);

    // create context menu
    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        fillApplicationsContextMenu(manager);
      }
    });

    Menu menu = menuManager.createContextMenu(applicationsViewer.getControl());
    applicationsViewer.getControl().setMenu(menu);
    editorPage.getSite().registerContextMenu(menuManager, applicationsViewer);

    Action addRemoveApplicationAction = new Action(Messages.ApplicationMasterPart_TEXT_ADD_REMOVE,
        ImageResource.getImageDescriptor(ImageResource.IMG_ETOOL_MODIFY_MODULES)) {
View Full Code Here

    toolBarManager.add(addServiceAction);
    toolBarManager.update(true);
    servicesSection.setTextClient(headerComposite);

    // create context menu
    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        fillServicesContextMenu(manager);
      }
    });

    Menu menu = menuManager.createContextMenu(servicesViewer.getControl());
    servicesViewer.getControl().setMenu(menu);
    editorPage.getSite().registerContextMenu(menuManager, servicesViewer);

    // Create drag source on the table
    int ops = DND.DROP_COPY;
View Full Code Here

    instancesContentProvider = new AppStatsContentProvider();
    instancesViewer.setContentProvider(instancesContentProvider);
    instancesViewer.setLabelProvider(new AppStatsLabelProvider());
    instancesViewer.setSorter(new CloudFoundryViewerSorter());

    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        fillInstancesContextMenu(manager);
      }
    });

    Menu menu = menuManager.createContextMenu(instancesViewer.getControl());
    instancesViewer.getControl().setMenu(menu);

    if (Platform.getBundle("org.eclipse.rse.ui") != null) { //$NON-NLS-1$
      final ConfigureRemoteCloudFoundryAction configAction = new ConfigureRemoteCloudFoundryAction(cloudServer);
      Link configLink = new Link(client, SWT.NONE);
View Full Code Here

    servicesViewer.setContentProvider(servicesContentProvider);
    servicesViewer.setLabelProvider(labelProvider);
    servicesViewer.setSorter(new CloudFoundryViewerSorter());
    servicesViewer.setInput(new CloudService[0]);

    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        fillServicesContextMenu(manager);
      }
    });

    Menu menu = menuManager.createContextMenu(servicesViewer.getControl());
    servicesViewer.getControl().setMenu(menu);
    // editorPage.getSite().registerContextMenu(ID_MENU_SERVICES,
    // menuManager, servicesViewer);

    servicesSection.setVisible(CloudFoundryBrandingExtensionPoint.getProvideServices(editorPage.getServer()
View Full Code Here

TOP

Related Classes of org.eclipse.jface.action.MenuManager

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.