Package org.eclipse.gef

Examples of org.eclipse.gef.ContextMenuProvider


                        .setParent(getCommonKeyHandler()));

        IAction showGrid = new ToggleGridAction(getGraphicalViewer());
        getActionRegistry().registerAction(showGrid);

        ContextMenuProvider provider = new GenericContextMenuProvider(
                getGraphicalViewer(), getActionRegistry());
        getGraphicalViewer().setContextMenu(provider);
        getSite().registerContextMenu("org.drools.eclipse.flow.editor.contextmenu",
                provider, getGraphicalViewer());
    }
View Full Code Here


    setPartName(getModel().getRootProject().getName());
   
    // Add contextuel Menu
    LayoutActions layoutActions = new LayoutActions(this);
    ContextMenuProvider contextMenuProvider = new ContextMenuProvider(getGraphicalViewer()) {
      /**
       * @see org.eclipse.gef.ContextMenuProvider#buildContextMenu(org.eclipse.jface.action.IMenuManager)
       */
      @Override
      public void buildContextMenu(IMenuManager menuManager) {
View Full Code Here

        graphicalViewer.setRootEditPart(scalableFreeformRootEditPart);
        zoomManager = scalableFreeformRootEditPart.getZoomManager();

        graphicalViewer.setEditPartFactory(new PartFactory());

        ContextMenuProvider provider = new PageContextMenuProvider(graphicalViewer,
                getActionRegistry());
        graphicalViewer.setContextMenu(provider);
        getSite().registerContextMenu("org.locationtech.udig.printing.editor.contextmenu", //$NON-NLS-1$
                provider, graphicalViewer);
View Full Code Here

        Control outline = getViewer().createControl(pagebook);
        getViewer().setEditDomain(editor.getEditDomain());
        getViewer().setEditPartFactory(new TreePartFactory());
        // getViewer().setKeyHandler(editor.getCommonKeyHandler());

        ContextMenuProvider cmProvider = new PageContextMenuProvider(getViewer(), editor
                .getActionRegistry());
        getViewer().setContextMenu(cmProvider);
        getSite().registerContextMenu("org.locationtech.udig.printing.outline.contextmenu", //$NON-NLS-1$
                cmProvider, getSite().getSelectionProvider());
        editor.getSelectionSynchronizer().addViewer(getViewer());
View Full Code Here

    viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.NONE),
        MouseWheelZoomHandler.SINGLETON);

    viewer.setKeyHandler(keyHandler);

    ContextMenuProvider provider = new WhiteboardContextMenuProvider(
        viewer, getActionRegistry());
    viewer.setContextMenu(provider);

  }
View Full Code Here

    getActionRegistry().registerAction(insertStaffdefsAction);
    // Add specific addChild actions
    addSpecificChildActions();
    viewer.setRootEditPart(root);
    viewer.setEditPartFactory(new GraphicalPartFactory());
    ContextMenuProvider provider = new MusicContextMenuProvider(viewer,
        getActionRegistry());
    viewer.setContextMenu(provider);
    getSite().registerContextMenu(
        "info.textgrid.lab.noteeditor.outline.contextmenu", //$NON-NLS-1$
        provider, viewer);
View Full Code Here

    }

    protected void configureOutlineViewer() {
      getViewer().setEditDomain(getEditDomain());
      getViewer().setEditPartFactory(new TreePartFactory());
      ContextMenuProvider provider = new MusicContextMenuProvider(
          getViewer(), getActionRegistry());
      getViewer().setContextMenu(provider);
      getSite().registerContextMenu(
          "info.textgrid.lab.noteeditor.outline.contextmenu", //$NON-NLS-1$
          provider, getSite().getSelectionProvider());
View Full Code Here

    viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL),
        MouseWheelZoomHandler.SINGLETON);

    // Context menu
    ContextMenuProvider provider = new GraphEditorContextMenuProvider(
        viewer, getActionRegistry());
    viewer.setContextMenu(provider);
  }
View Full Code Here

            getViewer().createControl(parent);
            // configure outline viewer
            getViewer().setEditDomain(getEditDomain());
            getViewer().setEditPartFactory(new ShapesTreeEditPartFactory());
            // configure & add context menu to viewer
            ContextMenuProvider cmProvider = new ShapesEditorContextMenuProvider(getViewer(), getActionRegistry());
            getViewer().setContextMenu(cmProvider);
            getSite().registerContextMenu("org.eclipse.gef.examples.shapes.outline.contextmenu", cmProvider,
                    getSite().getSelectionProvider());
            // hook outline viewer
            getSelectionSynchronizer().addViewer(getViewer());
View Full Code Here

        viewer.setEditPartFactory(new ShapesEditPartFactory());
        viewer.setRootEditPart(new ScalableFreeformRootEditPart());
        viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));

        // configure the context menu provider
        ContextMenuProvider cmProvider = new ShapesEditorContextMenuProvider(viewer, getActionRegistry());
        viewer.setContextMenu(cmProvider);
        getSite().registerContextMenu(cmProvider, viewer);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.ContextMenuProvider

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.