Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IMenuManager.appendToGroup()


                    IMenuManager targetMenu = manager.findMenuUsingPath(root);
                    if (targetMenu != null) {
                        IContributionItem find = targetMenu.find(groupName);
                        if ( find!=null && find instanceof GroupMarker ){
                            //targetMenu.appendToGroup(groupName, action); //$NON-NLS-1$
                            targetMenu.appendToGroup(groupName, tool.getAction());
                            targetMenu.setVisible(true);
                        }else{
                            targetMenu.add(action);
                            targetMenu.setVisible(true);
                        }
View Full Code Here


                toolManager.add(new GroupMarker("modal.ext")); //$NON-NLS-1$
            }
            if( toolManager.find(actionExt)==null ){
              toolManager.add(new GroupMarker(actionExt)); //$NON-NLS-1$
            }
            toolManager.appendToGroup(actionExt, actionMenu); //$NON-NLS-1$
            toolManager.setVisible(true);
        }
    }
    /**
     * Allows a ToolProxy to be contributed as a MenuItem.
View Full Code Here

                    item.runAction();
                }
            };
            newAction.setText(item.text);
            newAction.setImageDescriptor(item.icon);
            newMenu.appendToGroup(Constants.NEW_START, newAction);
        }
        newMenu.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST.create(window));

        if (fileMenu.findUsingPath(ActionFactory.CLOSE.getId()) == null) {
            IAction close = ActionFactory.CLOSE.create(window);
View Full Code Here

                        }
                    }
                }
                if (manager != null) {
                    if (markerID != null)
                        manager.appendToGroup(markerID, action);
                    else {
                        manager.add(action);
                    }
                } else {
                    UiPlugin.log(action.getMenuPath() + " is not a valid menuPath", null); //$NON-NLS-1$                               
View Full Code Here

                    item.runAction();
                }
            };
            newAction.setText(item.text);
            newAction.setImageDescriptor(item.icon);
            newMenu.appendToGroup(Constants.NEW_START, newAction);
        }
        newMenu.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST.create(window));

        fileMenu.add(newMenu);
        fileMenu.add(new GroupMarker(Constants.OPEN_EXT));
View Full Code Here

        }
        IWorkbench workbench = PlatformUI.getWorkbench();
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        // we are using the global BACK and FORWARD actions here
        // and will register "handlers" for these commands
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.BACK.create(window));
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.FORWARD.create(window));
       
        if (!manager.isVisible()){
View Full Code Here

        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        // we are using the global BACK and FORWARD actions here
        // and will register "handlers" for these commands
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.BACK.create(window));
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.FORWARD.create(window));
       
        if (!manager.isVisible()){
            // since this is the top level menu bar why would it not be visible?
            manager.setVisible(true);
View Full Code Here

                    menu = targetMenu.findMenuUsingPath(items[ii].toLowerCase());                 
                }
               
                if (menu == null) {                 
                    menu = createMenu(items[ii], items[ii]);
                    targetMenu.appendToGroup(ADDITIONS_GROUP, menu);
                }
               
                targetMenu = menu;
            }
           
View Full Code Here

            group = items[items.length - 1];
            IContributionItem groupItem = targetMenu.find(group);
           
            if (groupItem == null) {
                groupItem = new GroupMarker(group);
                targetMenu.appendToGroup(ADDITIONS_GROUP, groupItem);
            }
           
            targetMenu.appendToGroup(group, action);
            handleActionAccelerator(action, targetMenu, serviceReference);
            targetMenu.appendToGroup(group, new Separator());
View Full Code Here

            if (groupItem == null) {
                groupItem = new GroupMarker(group);
                targetMenu.appendToGroup(ADDITIONS_GROUP, groupItem);
            }
           
            targetMenu.appendToGroup(group, action);
            handleActionAccelerator(action, targetMenu, serviceReference);
            targetMenu.appendToGroup(group, new Separator());
            algorithmsToActions.put(getItemID(serviceReference), action);
            actionsToMenuManagers.put(action, targetMenu);
           
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.