Java Code Examples for org.eclipse.jdt.ui.IContextMenuConstants#GROUP_SEARCH
The following examples show how to use
org.eclipse.jdt.ui.IContextMenuConstants#GROUP_SEARCH .
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: ImplementorsSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates a new <code>ImplementorsSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public ImplementorsSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fFindImplementorsAction= new FindImplementorsAction(site); fFindImplementorsAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKSPACE); fFindImplementorsInProjectAction= new FindImplementorsInProjectAction(site); fFindImplementorsInProjectAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_PROJECT); fFindImplementorsInWorkingSetAction= new FindImplementorsInWorkingSetAction(site); fFindImplementorsInWorkingSetAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKING_SET); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fFindImplementorsAction, provider, selection, specialSelectionProvider); registerAction(fFindImplementorsInProjectAction, provider, selection, specialSelectionProvider); registerAction(fFindImplementorsInWorkingSetAction, provider, selection, specialSelectionProvider); }
Example 2
Source File: ImplementorsSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager manager) { MenuManager javaSearchMM= new MenuManager(MENU_TEXT, IContextMenuConstants.GROUP_SEARCH); addAction(fFindImplementorsAction, javaSearchMM); addAction(fFindImplementorsInProjectAction, javaSearchMM); javaSearchMM.add(new Separator()); Iterator<IWorkingSet[]> iter= SearchUtil.getLRUWorkingSets().sortedIterator(); while (iter.hasNext()) { addWorkingSetAction(iter.next(), javaSearchMM); } addAction(fFindImplementorsInWorkingSetAction, javaSearchMM); if (!javaSearchMM.isEmpty()) manager.appendToGroup(fGroupId, javaSearchMM); }
Example 3
Source File: WriteReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates a new <code>WriteReferencesSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public WriteReferencesSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fFindWriteReferencesAction= new FindWriteReferencesAction(site); fFindWriteReferencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_WORKSPACE); fFindWriteReferencesInProjectAction= new FindWriteReferencesInProjectAction(site); fFindWriteReferencesInProjectAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_PROJECT); fFindWriteReferencesInHierarchyAction= new FindWriteReferencesInHierarchyAction(site); fFindWriteReferencesInHierarchyAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_HIERARCHY); fFindWriteReferencesInWorkingSetAction= new FindWriteReferencesInWorkingSetAction(site); fFindWriteReferencesInWorkingSetAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_WORKING_SET); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fFindWriteReferencesAction, provider, selection, specialSelectionProvider); registerAction(fFindWriteReferencesInProjectAction, provider, selection, specialSelectionProvider); registerAction(fFindWriteReferencesInHierarchyAction, provider, selection, specialSelectionProvider); registerAction(fFindWriteReferencesInWorkingSetAction, provider, selection, specialSelectionProvider); }
Example 4
Source File: WriteReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager manager) { MenuManager javaSearchMM= new MenuManager(MENU_TEXT, IContextMenuConstants.GROUP_SEARCH); addAction(fFindWriteReferencesAction, javaSearchMM); addAction(fFindWriteReferencesInProjectAction, javaSearchMM); addAction(fFindWriteReferencesInHierarchyAction, javaSearchMM); javaSearchMM.add(new Separator()); Iterator<IWorkingSet[]> iter= SearchUtil.getLRUWorkingSets().sortedIterator(); while (iter.hasNext()) { addWorkingSetAction(iter.next(), javaSearchMM); } addAction(fFindWriteReferencesInWorkingSetAction, javaSearchMM); if (!javaSearchMM.isEmpty()) manager.appendToGroup(fGroupId, javaSearchMM); }
Example 5
Source File: DeclarationsSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates a new <code>DeclarationsSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public DeclarationsSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fFindDeclarationsAction= new FindDeclarationsAction(site); fFindDeclarationsAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_DECLARATIONS_IN_WORKSPACE); fFindDeclarationsInProjectAction= new FindDeclarationsInProjectAction(site); fFindDeclarationsInProjectAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_DECLARATIONS_IN_PROJECTS); fFindDeclarationsInHierarchyAction= new FindDeclarationsInHierarchyAction(site); fFindDeclarationsInHierarchyAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_DECLARATIONS_IN_HIERARCHY); fFindDeclarationsInWorkingSetAction= new FindDeclarationsInWorkingSetAction(site); fFindDeclarationsInWorkingSetAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_DECLARATIONS_IN_WORKING_SET); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fFindDeclarationsAction, provider, selection, specialSelectionProvider); registerAction(fFindDeclarationsInProjectAction, provider, selection, specialSelectionProvider); registerAction(fFindDeclarationsInHierarchyAction, provider, selection, specialSelectionProvider); registerAction(fFindDeclarationsInWorkingSetAction, provider, selection, specialSelectionProvider); }
Example 6
Source File: DeclarationsSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager manager) { IMenuManager javaSearchMM= new MenuManager(MENU_TEXT, IContextMenuConstants.GROUP_SEARCH); addAction(fFindDeclarationsAction, javaSearchMM); addAction(fFindDeclarationsInProjectAction, javaSearchMM); addAction(fFindDeclarationsInHierarchyAction, javaSearchMM); javaSearchMM.add(new Separator()); Iterator<IWorkingSet[]> iter= SearchUtil.getLRUWorkingSets().sortedIterator(); while (iter.hasNext()) { addWorkingSetAction(iter.next(), javaSearchMM); } addAction(fFindDeclarationsInWorkingSetAction, javaSearchMM); if (!javaSearchMM.isEmpty()) manager.appendToGroup(fGroupId, javaSearchMM); }
Example 7
Source File: ReadReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates a new <code>ReadReferencesSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public ReadReferencesSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fFindReadReferencesAction= new FindReadReferencesAction(site); fFindReadReferencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_WORKSPACE); fFindReadReferencesInProjectAction= new FindReadReferencesInProjectAction(site); fFindReadReferencesInProjectAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_READ_ACCESS_IN_PROJECT); fFindReadReferencesInHierarchyAction= new FindReadReferencesInHierarchyAction(site); fFindReadReferencesInHierarchyAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_HIERARCHY); fFindReadReferencesInWorkingSetAction= new FindReadReferencesInWorkingSetAction(site); fFindReadReferencesInWorkingSetAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_WRITE_ACCESS_IN_WORKING_SET); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fFindReadReferencesAction, provider, selection, specialSelectionProvider); registerAction(fFindReadReferencesInProjectAction, provider, selection, specialSelectionProvider); registerAction(fFindReadReferencesInHierarchyAction, provider, selection, specialSelectionProvider); registerAction(fFindReadReferencesInWorkingSetAction, provider, selection, specialSelectionProvider); }
Example 8
Source File: ReadReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager manager) { MenuManager javaSearchMM= new MenuManager(MENU_TEXT, IContextMenuConstants.GROUP_SEARCH); addAction(fFindReadReferencesAction, javaSearchMM); addAction(fFindReadReferencesInProjectAction, javaSearchMM); addAction(fFindReadReferencesInHierarchyAction, javaSearchMM); javaSearchMM.add(new Separator()); Iterator<IWorkingSet[]> iter= SearchUtil.getLRUWorkingSets().sortedIterator(); while (iter.hasNext()) { addWorkingSetAction(iter.next(), javaSearchMM); } addAction(fFindReadReferencesInWorkingSetAction, javaSearchMM); if (!javaSearchMM.isEmpty()) manager.appendToGroup(fGroupId, javaSearchMM); }
Example 9
Source File: ReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates a new <code>ReferencesSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public ReferencesSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fFindReferencesAction= new FindReferencesAction(site); fFindReferencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_REFERENCES_IN_WORKSPACE); fFindReferencesInProjectAction= new FindReferencesInProjectAction(site); fFindReferencesInProjectAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_REFERENCES_IN_PROJECT); fFindReferencesInHierarchyAction= new FindReferencesInHierarchyAction(site); fFindReferencesInHierarchyAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_REFERENCES_IN_HIERARCHY); fFindReferencesInWorkingSetAction= new FindReferencesInWorkingSetAction(site); fFindReferencesInWorkingSetAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_REFERENCES_IN_WORKING_SET); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fFindReferencesAction, provider, selection, specialSelectionProvider); registerAction(fFindReferencesInProjectAction, provider, selection, specialSelectionProvider); registerAction(fFindReferencesInHierarchyAction, provider, selection, specialSelectionProvider); registerAction(fFindReferencesInWorkingSetAction, provider, selection, specialSelectionProvider); }
Example 10
Source File: ReferencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager manager) { MenuManager javaSearchMM= new MenuManager(getName(), IContextMenuConstants.GROUP_SEARCH); addAction(fFindReferencesAction, javaSearchMM); addAction(fFindReferencesInProjectAction, javaSearchMM); addAction(fFindReferencesInHierarchyAction, javaSearchMM); javaSearchMM.add(new Separator()); Iterator<IWorkingSet[]> iter= SearchUtil.getLRUWorkingSets().sortedIterator(); while (iter.hasNext()) { addWorkingSetAction(iter.next(), javaSearchMM); } addAction(fFindReferencesInWorkingSetAction, javaSearchMM); if (!javaSearchMM.isEmpty()) manager.appendToGroup(fGroupId, javaSearchMM); }
Example 11
Source File: SearchScopeActionGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public void fillContextMenu(IMenuManager menu) { MenuManager javaSearchMM = new MenuManager(CallHierarchyMessages.SearchScopeActionGroup_searchScope, IContextMenuConstants.GROUP_SEARCH); javaSearchMM.setRemoveAllWhenShown(true); javaSearchMM.addMenuListener(new IMenuListener() { /* (non-Javadoc) * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager) */ public void menuAboutToShow(IMenuManager manager) { fillSearchActions(manager); } }); fillSearchActions(javaSearchMM); menu.appendToGroup(IContextMenuConstants.GROUP_SEARCH, javaSearchMM); }
Example 12
Source File: OccurrencesSearchGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Creates a new <code>OccurrencesSearchGroup</code>. The group requires * that the selection provided by the given selection provider is of type * {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the * sites selection provider. * * @since 3.4 */ public OccurrencesSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) { fSite= site; fGroupId= IContextMenuConstants.GROUP_SEARCH; fOccurrencesInFileAction= new FindOccurrencesInFileAction(site); fOccurrencesInFileAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_OCCURRENCES_IN_FILE); // Need to reset the label fOccurrencesInFileAction.setText(SearchMessages.Search_FindOccurrencesInFile_shortLabel); fExceptionOccurrencesAction= new FindExceptionOccurrencesAction(site); fExceptionOccurrencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_EXCEPTION_OCCURRENCES_IN_FILE); fFindImplementorOccurrencesAction= new FindImplementOccurrencesAction(site); fFindImplementorOccurrencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENT_OCCURRENCES_IN_FILE); fBreakContinueTargetOccurrencesAction= new FindBreakContinueTargetOccurrencesAction(site); fBreakContinueTargetOccurrencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_BREAK_CONTINUE_TARGET_OCCURRENCES); fMethodExitOccurrencesAction= new FindMethodExitOccurrencesAction(site); fMethodExitOccurrencesAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SEARCH_METHOD_EXIT_OCCURRENCES); // register the actions as selection listeners ISelectionProvider provider= specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; ISelection selection= provider.getSelection(); registerAction(fOccurrencesInFileAction, provider, selection, specialSelectionProvider); registerAction(fExceptionOccurrencesAction, provider, selection, specialSelectionProvider); registerAction(fFindImplementorOccurrencesAction, provider, selection, specialSelectionProvider); registerAction(fBreakContinueTargetOccurrencesAction, provider, selection, specialSelectionProvider); registerAction(fMethodExitOccurrencesAction, provider, selection, specialSelectionProvider); }