Java Code Examples for org.eclipse.jdt.internal.ui.JavaPlugin#createStandardGroups()
The following examples show how to use
org.eclipse.jdt.internal.ui.JavaPlugin#createStandardGroups() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CallHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
protected void fillCallHierarchyViewerContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshSingleElementAction); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, new Separator(GROUP_FOCUS)); if (fFocusOnSelectionAction.canActionBeAdded()) { menu.appendToGroup(GROUP_FOCUS, fFocusOnSelectionAction); } if (fExpandWithConstructorsAction.canActionBeAdded()) { menu.appendToGroup(GROUP_FOCUS, fExpandWithConstructorsAction); } if (fRemoveFromViewAction.canActionBeAdded()){ menu.appendToGroup(GROUP_FOCUS, fRemoveFromViewAction); } fActionGroups.setContext(new ActionContext(getSelection())); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); if (fCopyAction.canActionBeAdded()) { menu.appendToGroup(ICommonMenuConstants.GROUP_EDIT, fCopyAction); } }
Example 2
Source File: PackageExplorerPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public void menuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); fActionSet.setContext(new ActionContext(getSelection())); fActionSet.fillContextMenu(menu); fActionSet.setContext(null); }
Example 3
Source File: CallHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected void fillLocationViewerContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fOpenLocationAction); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshSingleElementAction); menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fLocationCopyAction); }
Example 4
Source File: JavaOutlinePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected void contextMenuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); IStructuredSelection selection= (IStructuredSelection)getSelection(); fActionGroups.setContext(new ActionContext(selection)); fActionGroups.fillContextMenu(menu); }
Example 5
Source File: TypeHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) { JavaPlugin.createStandardGroups(menu); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, new Separator(GROUP_FOCUS)); // viewer entries viewer.contributeToContextMenu(menu); if (fFocusOnSelectionAction.canActionBeAdded()) menu.appendToGroup(GROUP_FOCUS, fFocusOnSelectionAction); menu.appendToGroup(GROUP_FOCUS, fFocusOnTypeAction); fActionGroups.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); }
Example 6
Source File: TypeHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void fillMethodsViewerContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); // viewer entries fMethodsViewer.contributeToContextMenu(menu); fActionGroups.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); }
Example 7
Source File: DialogPackageExplorer.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Populate the context menu with the necessary actions. * * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager) */ public void menuAboutToShow(IMenuManager manager) { if (fActionGroup == null) // no context menu return; JavaPlugin.createStandardGroups(manager); fActionGroup.fillContextMenu(manager); }
Example 8
Source File: JavaBrowsingPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public void menuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection(); int size= selection.size(); Object element= selection.getFirstElement(); if (size == 1) addOpenNewWindowAction(menu, element); fActionGroups.setContext(new ActionContext(selection)); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); }
Example 9
Source File: JavaEditorBreadcrumbActionGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public void fillContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); super.fillContextMenu(menu); }