Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IMenuListener


     */
    private void initContextMenu()
    {
        contextMenu = new MenuManager( "" ); //$NON-NLS-1$
        contextMenu.setRemoveAllWhenShown( true );
        contextMenu.addMenuListener( new IMenuListener()
        {
            public void menuAboutToShow( IMenuManager manager )
            {
                MenuManager newManager = new MenuManager( Messages.getString( "SchemaViewController.NewAction" ) ); //$NON-NLS-1$
                MenuManager importManager = new MenuManager( Messages.getString( "SchemaViewController.ImportAction" ) ); //$NON-NLS-1$
View Full Code Here


    private void initContextMenu( final Viewer targetViewer ) {

        final MenuManager contextMenu = new MenuManager();

        contextMenu.setRemoveAllWhenShown(true);
        contextMenu.addMenuListener(new IMenuListener(){

            public void menuAboutToShow( IMenuManager mgr ) {
               
                if (canAddFolder()) {
                    contextMenu.add(newFolderAction());   
View Full Code Here

     */
    private void createContextMenuFor( final Viewer viewer2 ) {
        final MenuManager contextMenu = new MenuManager();

        contextMenu.setRemoveAllWhenShown(true);
        contextMenu.addMenuListener(new IMenuListener(){

            public void menuAboutToShow( IMenuManager mgr ) {
                contextMenu.add(ApplicationGIS.getToolManager().getCOPYAction(LayersView.this));
                contextMenu.add(ApplicationGIS.getToolManager().getPASTEAction(LayersView.this));
                contextMenu.add(getDeleteAction());
View Full Code Here

        Menu menu;
        menu = viewer.getMenu();
        if (menu == null) {
            final MenuManager contextMenu = new MenuManager();
            contextMenu.setRemoveAllWhenShown(true);
            contextMenu.addMenuListener(new IMenuListener(){
                public void menuAboutToShow( IMenuManager mgr ) {
                    IToolManager tm = ApplicationGIS.getToolManager();

                    contextMenu.add(new Separator());
                    contextMenu.add(tm.getBACKWARD_HISTORYAction());
View Full Code Here

        Menu menu;
        menu = viewer.getMenu();
        if (menu == null) {
            final MenuManager contextMenu = new MenuManager();
            contextMenu.setRemoveAllWhenShown(true);
            contextMenu.addMenuListener(new IMenuListener(){
                public void menuAboutToShow( IMenuManager mgr ) {
                    IToolManager tm = ApplicationGIS.getToolManager();
                   
                    contextMenu.add(tm.getENTERAction());
                    contextMenu.add(new Separator());
View Full Code Here

            }
        };

        Messages.initAction(refreshAction, "action_refresh"); //$NON-NLS-1$
        contextMenu.setRemoveAllWhenShown(true);
        contextMenu.addMenuListener(new IMenuListener(){

            public void menuAboutToShow( IMenuManager mgr ) {
                contextMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                contextMenu.add(new Separator());
View Full Code Here

  }

  private void addContextMenu() {
    final MenuManager contextMenu = new MenuManager();
    contextMenu.setRemoveAllWhenShown(true);
    contextMenu.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager mgr) {
        contextMenu.add(fixAction);
        contextMenu.add(deleteAction);
        contextMenu.add(saveAction);
View Full Code Here

   
    private void createContextMenu() {
        final MenuManager contextMenu = new MenuManager();

        contextMenu.setRemoveAllWhenShown(true);
        contextMenu.addMenuListener(new IMenuListener(){

            public void menuAboutToShow( IMenuManager mgr ) {
                contextMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                contextMenu.add(new Separator());
                contextMenu.add(removeAction);
View Full Code Here

    }

    private void initPopup() {
        menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(new IMenuListener(){
            public void menuAboutToShow( IMenuManager manager ) {
                fillContextMenu(manager);
            }
        });
        Menu m = menuMgr.createContextMenu(bookmarksTree.getTree());
View Full Code Here

   
    private void createContextMenu( Control control ){
        final MenuManager menuManager = new MenuManager();
        menuManager.setRemoveAllWhenShown(true); // we are going to generate
       
        menuManager.addMenuListener( new IMenuListener() {
            public void menuAboutToShow(IMenuManager manager) {
                int current = -1;
                for( FilterViewerFactory factory : filterViewerFactory( getInput(), getFilter() ) ){
                    int currentScore = factory.appropriate(getInput(), getFilter() );
                    int category = FilterViewerFactory.toCategory( currentScore );
View Full Code Here

TOP

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

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.