Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.GroupMarker


            public void menuAboutToShow( IMenuManager mgr ) {
                contextMenu.add(ApplicationGIS.getToolManager().getCOPYAction(LayersView.this));
                contextMenu.add(ApplicationGIS.getToolManager().getPASTEAction(LayersView.this));
                contextMenu.add(getDeleteAction());
                contextMenu.add(new Separator());
                contextMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                // LayerApplicabilityMenuCreator creator = getApplicabilityMenu();
                // if (creator != null)
                // contextMenu.add(creator.getMenuManager());
                contextMenu.add(ApplicationGIS.getToolManager().createOperationsContextMenu(
                        viewer.getSelection()));
View Full Code Here


        formdata.bottom = new FormAttachment(100, -ScaleRatioLabel.STATUS_LINE_HEIGHT);
        formdata.left = new FormAttachment(0);
        formdata.right = new FormAttachment(100);
        viewer.getViewport().getControl().setLayoutData(formdata);

        statusLineManager.add(new GroupMarker(StatusLineManager.BEGIN_GROUP));
        statusLineManager.add(new GroupMarker(StatusLineManager.MIDDLE_GROUP));
        statusLineManager.add(new GroupMarker(StatusLineManager.END_GROUP));
        statusLineManager.createControl(composite, SWT.BORDER);
        formdata = new FormData();
        formdata.left = new FormAttachment(0);
        formdata.right = new FormAttachment(100);
        formdata.top = new FormAttachment(viewer.getViewport().getControl(), 0, SWT.BOTTOM);
View Full Code Here

                     * Gets contributions from active modal tool if possible
                     */
                    tm.contributeActiveModalTool(contextMenu);

                    contextMenu.add(new Separator());
                    contextMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                    if (getMap().getEditManager().getEditFeature() != null) {
                        contextMenu.add(ProjectUIPlugin.getDefault().getFeatureEditProcessor()
                                .getEditFeatureAction(
                                        getSite().getSelectionProvider().getSelection()));

View Full Code Here

        MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
        MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
       
        menuBar.add(fileMenu);
        // Add a group marker indicating where action set menus will appear.
        menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        menuBar.add(helpMenu);
       
        // File
        fileMenu.add(newWindowAction);
        fileMenu.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());

                refreshAction.setImageDescriptor(CatalogUIPlugin.getDefault().getImageDescriptor(ImageConstants.REFRESH_CO));

                // contextMenu.add(refreshAction);
View Full Code Here

     *
     * @return the edit feature action
     */
    public IContributionItem getEditFeatureAction( final ISelection selection ) {
        if (selection.isEmpty())
            return new GroupMarker("editAction"); //$NON-NLS-1$

        if (!(selection instanceof IStructuredSelection))
            return new GroupMarker("editAction"); //$NON-NLS-1$
        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
        if (!sameFeatureTypes(structuredSelection))
            return new GroupMarker("editAction"); //$NON-NLS-1$

        SimpleFeature feature = (SimpleFeature) structuredSelection.getFirstElement();
        IContributionItem item = selectedEditors.get(feature.getFeatureType());
        if (item != null)
            return item;

        FeatureEditorLoader loader = getClosestMatch(selection);
        if (loader != null)
            return createEditAction(loader, selection, feature);

        return new GroupMarker("editAction"); //$NON-NLS-1$
    }
View Full Code Here

     *
     * @return the edit/editWith menu items if the current selection is a feature.
     */
    public IContributionItem getEditWithFeatureMenu( ISelection selection ) {
        if (selection.isEmpty())
            return new GroupMarker("editWithMenu"); //$NON-NLS-1$
        MenuManager editWithMenu = new MenuManager(
                Messages.FeatureEditorExtensionProcessor_editWithMenu);
        for( FeatureEditorLoader loader : editorLoaders ) {
            IAction editorAction = loader.getAction(selection);
            if (editorAction != null)
                editWithMenu.add(editorAction);
        }
        editWithMenu.setVisible(true);
        if (editWithMenu.getItems().length == 0)
            return new GroupMarker("editWithMenu"); //$NON-NLS-1$
        return editWithMenu;
    }
View Full Code Here

            editMenu = new MenuManager(Messages.UDIGWorkbenchAdvisor_edit,
                    IWorkbenchActionConstants.M_EDIT);
            menuBar.insertAfter(IWorkbenchActionConstants.M_FILE, editMenu);
        }
        if (menuBar.findUsingPath(IWorkbenchActionConstants.MB_ADDITIONS) == null) {
            menuBar.insertAfter(IWorkbenchActionConstants.M_EDIT, new GroupMarker(
                    IWorkbenchActionConstants.MB_ADDITIONS));
        }
        IMenuManager windowMenu = menuBar.findMenuUsingPath(IWorkbenchActionConstants.M_WINDOW);
        if (windowMenu == null) {
            windowMenu = new MenuManager(Messages.UDIGWorkbenchAdvisor_window,
View Full Code Here

        toolbar.add(new NewObjectContribution(window));

        toolbar.add(ActionFactory.SAVE.create(window));
        toolbar.add(ActionFactory.SAVE_ALL.create(window));

        toolbar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));

        return toolbar;
    }
View Full Code Here

    }

    private void setupFileMenuStructure( IMenuManager fileMenu ) {
        if (fileMenu.findUsingPath(IWorkbenchActionConstants.FILE_START) == null) {
            if (fileMenu.getItems().length > 0) {
                fileMenu.insertBefore(fileMenu.getItems()[0].getId(), new GroupMarker(
                        Constants.FILE_START));
            } else {
                fileMenu.add(new GroupMarker(Constants.FILE_START));
            }
        }

        if (fileMenu.findUsingPath(Constants.OPEN_EXT) == null) {
            fileMenu.insertAfter(Constants.FILE_START, new GroupMarker(Constants.OPEN_EXT));
        }

        if (fileMenu.findUsingPath(Constants.CLOSE_EXT) == null) {
            fileMenu.insertAfter(Constants.OPEN_EXT, new GroupMarker(Constants.CLOSE_EXT));
        }

        if (fileMenu.findUsingPath(Constants.SAVE_EXT) == null) {
            fileMenu.insertAfter(Constants.CLOSE_EXT, new GroupMarker(Constants.SAVE_EXT));
        }

        if (fileMenu.findUsingPath(IWorkbenchActionConstants.MB_ADDITIONS) == null) {
            fileMenu.insertAfter(Constants.SAVE_EXT, new GroupMarker(
                    IWorkbenchActionConstants.MB_ADDITIONS));
        }

        if (fileMenu.findUsingPath(Constants.FILE_END) == null) {
            fileMenu.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new GroupMarker(
                    Constants.FILE_END));
        }

        fileMenu.insertAfter(Constants.OPEN_EXT, new Separator());
        fileMenu.insertAfter(Constants.CLOSE_EXT, new Separator());
View Full Code Here

TOP

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

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.