private int fillEditorSubMenu(IMenuManager source) { int added= 0; source.add(new Separator(GROUP_COMMENT)); added+= addEditorAction(source, "ToggleComment"); //$NON-NLS-1$ added+= addEditorAction(source, "AddBlockComment"); //$NON-NLS-1$ added+= addEditorAction(source, "RemoveBlockComment"); //$NON-NLS-1$ added+= addAction(source, fAddJavaDocStub); source.add(new Separator(GROUP_EDIT)); added+= addEditorAction(source, "Indent"); //$NON-NLS-1$ added+= addEditorAction(source, "Format"); //$NON-NLS-1$ added+= addEditorAction(source, "QuickFormat"); //$NON-NLS-1$ source.add(new Separator(GROUP_IMPORT)); added+= addAction(source, fAddImport); added+= addAction(source, fOrganizeImports); added+= addAction(source, fSortMembers); added+= addAction(source, fCleanUp); source.add(new Separator(GROUP_GENERATE)); added+= addAction(source, fOverrideMethods); added+= addAction(source, fAddGetterSetter); added+= addAction(source, fAddDelegateMethods); added+= addAction(source, fHashCodeEquals); added+= addAction(source, fToString); added+= addAction(source, fGenerateConstructorUsingFields); added+= addAction(source, fAddUnimplementedConstructors); source.add(new Separator(GROUP_CODE)); source.add(new Separator(GROUP_EXTERNALIZE)); added+= addAction(source, fExternalizeStrings); return added; }
private void fillQuickMenu(IMenuManager menu) { if (isEditorOwner()) { fillEditorSubMenu(menu); } else { fillViewSubMenu(menu); } }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the part's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public GenerateActionGroup(IViewPart part) { this(part.getSite(), null); installQuickAccessAction(); }
public NewSearchViewActionGroup(IViewPart part) { Assert.isNotNull(part); OpenViewActionGroup openViewActionGroup; setGroups(new ActionGroup[]{ fOpenEditorActionGroup= new OpenEditorActionGroup(part), openViewActionGroup= new OpenViewActionGroup(part), new GenerateActionGroup(part), new RefactorActionGroup(part), new JavaSearchActionGroup(part) }); openViewActionGroup.containsShowInMenu(false); }
registerSelectionListener(provider, fOverrideMethods); registerSelectionListener(provider, fAddGetterSetter); registerSelectionListener(provider, fAddDelegateMethods); registerSelectionListener(provider, fAddUnimplementedConstructors); registerSelectionListener(provider, fGenerateConstructorUsingFields); registerSelectionListener(provider, fHashCodeEquals); registerSelectionListener(provider, fAddJavaDocStub); registerSelectionListener(provider, fAddBookmark); registerSelectionListener(provider, fExternalizeStrings); registerSelectionListener(provider, fFindNLSProblems); registerSelectionListener(provider, fOrganizeImports); registerSelectionListener(provider, fFormatAll); registerSelectionListener(provider, fSortMembers); registerSelectionListener(provider, fAddTaskAction); registerSelectionListener(provider, fCleanUp); installQuickAccessAction();
/** * Note: This method is for internal use only. Clients should not call this method. * * @noreference This method is not intended to be referenced by clients. * @deprecated As of 3.5, this method is no longer called */ @Deprecated public void editorStateChanged() { Assert.isTrue(isEditorOwner()); }
@Override public void fillContextMenu(IMenuManager menu) { if (fInViewPart) { fOpenViewGroup.fillContextMenu(menu); fCCPGroup.fillContextMenu(menu); fBuildPathGroup.fillContextMenu(menu); fGenerateGroup.fillContextMenu(menu); fSearchGroup.fillContextMenu(menu); } }
public void fillActionBars(IActionBars actionBars) { if (fInViewPart) { fOpenViewGroup.fillActionBars(actionBars); fCCPGroup.fillActionBars(actionBars); fBuildPathGroup.fillActionBars(actionBars); fGenerateGroup.fillActionBars(actionBars); fSearchGroup.fillActionBars(actionBars); } }
private int fillViewSubMenu(IMenuManager source) { int added= 0; source.add(new Separator(GROUP_COMMENT)); added+= addAction(source, fAddJavaDocStub); source.add(new Separator(GROUP_EDIT)); added+= addAction(source, fFormatAll); source.add(new Separator(GROUP_IMPORT)); added+= addAction(source, fAddImport); added+= addAction(source, fOrganizeImports); added+= addAction(source, fSortMembers); added+= addAction(source, fCleanUp); source.add(new Separator(GROUP_GENERATE)); added+= addAction(source, fOverrideMethods); added+= addAction(source, fAddGetterSetter); added+= addAction(source, fAddDelegateMethods); added+= addAction(source, fHashCodeEquals); added+= addAction(source, fToString); added+= addAction(source, fGenerateConstructorUsingFields); added+= addAction(source, fAddUnimplementedConstructors); source.add(new Separator(GROUP_CODE)); source.add(new Separator(GROUP_EXTERNALIZE)); added+= addAction(source, fExternalizeStrings); added+= addAction(source, fFindNLSProblems); return added; }
registerSelectionListener(fSelectionProvider, fAddBookmark); SelectionDispatchAction[] actions= new SelectionDispatchAction[] { fOverrideMethods, registerSelectionListener(fSelectionProvider, action); if (selectionProvider != null) { action.setSpecialSelectionProvider(fSelectionProvider);
public NewSearchViewActionGroup(IViewPart part) { Assert.isNotNull(part); OpenViewActionGroup openViewActionGroup; setGroups(new ActionGroup[]{ new OpenEditorActionGroup(part), openViewActionGroup= new OpenViewActionGroup(part), new GenerateActionGroup(part), new RefactorActionGroup(part), new JavaSearchActionGroup(part) }); openViewActionGroup.containsShowInMenu(false); } }
/** * Note: This method is for internal use only. Clients should not call this method. * * @noreference This method is not intended to be referenced by clients. * @deprecated As of 3.5, this method is no longer called */ @Deprecated public void editorStateChanged() { Assert.isTrue(isEditorOwner()); }
@Override public void fillContextMenu(IMenuManager menu) { if (fInViewPart) { fOpenViewGroup.fillContextMenu(menu); fCCPGroup.fillContextMenu(menu); fBuildPathGroup.fillContextMenu(menu); fGenerateGroup.fillContextMenu(menu); fSearchGroup.fillContextMenu(menu); } }
@Override public void fillActionBars(IActionBars actionBars) { if (fInViewPart) { fOpenViewGroup.fillActionBars(actionBars); fCCPGroup.fillActionBars(actionBars); fBuildPathGroup.fillActionBars(actionBars); fGenerateGroup.fillActionBars(actionBars); fSearchGroup.fillActionBars(actionBars); } }
private int fillViewSubMenu(IMenuManager source) { int added= 0; source.add(new Separator(GROUP_COMMENT)); added+= addAction(source, fAddJavaDocStub); source.add(new Separator(GROUP_EDIT)); added+= addAction(source, fFormatAll); source.add(new Separator(GROUP_IMPORT)); added+= addAction(source, fAddImport); added+= addAction(source, fOrganizeImports); added+= addAction(source, fSortMembers); added+= addAction(source, fCleanUp); source.add(new Separator(GROUP_GENERATE)); added+= addAction(source, fOverrideMethods); added+= addAction(source, fAddGetterSetter); added+= addAction(source, fAddDelegateMethods); added+= addAction(source, fHashCodeEquals); added+= addAction(source, fToString); added+= addAction(source, fGenerateConstructorUsingFields); added+= addAction(source, fAddUnimplementedConstructors); source.add(new Separator(GROUP_CODE)); source.add(new Separator(GROUP_EXTERNALIZE)); added+= addAction(source, fExternalizeStrings); added+= addAction(source, fFindNLSProblems); return added; }
registerSelectionListener(fSelectionProvider, fAddBookmark); SelectionDispatchAction[] actions= new SelectionDispatchAction[] { fOverrideMethods, registerSelectionListener(fSelectionProvider, action); if (selectionProvider != null) { action.setSpecialSelectionProvider(fSelectionProvider);
private void fillQuickMenu(IMenuManager menu) { if (isEditorOwner()) { if (!fEditor.isBreadcrumbActive()) fillEditorSubMenu(menu); } else { fillViewSubMenu(menu); } }
public NewSearchViewActionGroup(IViewPart part) { Assert.isNotNull(part); OpenViewActionGroup openViewActionGroup; setGroups(new ActionGroup[]{ new OpenEditorActionGroup(part), openViewActionGroup= new OpenViewActionGroup(part), new GenerateActionGroup(part), new RefactorActionGroup(part), new JavaSearchActionGroup(part) }); openViewActionGroup.containsShowInMenu(false); } }
private int fillEditorSubMenu(IMenuManager source) { int added= 0; source.add(new Separator(GROUP_COMMENT)); added+= addEditorAction(source, "ToggleComment"); //$NON-NLS-1$ added+= addEditorAction(source, "AddBlockComment"); //$NON-NLS-1$ added+= addEditorAction(source, "RemoveBlockComment"); //$NON-NLS-1$ added+= addAction(source, fAddJavaDocStub); source.add(new Separator(GROUP_EDIT)); added+= addEditorAction(source, "Indent"); //$NON-NLS-1$ added+= addEditorAction(source, "Format"); //$NON-NLS-1$ added+= addEditorAction(source, "QuickFormat"); //$NON-NLS-1$ source.add(new Separator(GROUP_IMPORT)); added+= addAction(source, fAddImport); added+= addAction(source, fOrganizeImports); added+= addAction(source, fSortMembers); added+= addAction(source, fCleanUp); source.add(new Separator(GROUP_GENERATE)); added+= addAction(source, fOverrideMethods); added+= addAction(source, fAddGetterSetter); added+= addAction(source, fAddDelegateMethods); added+= addAction(source, fHashCodeEquals); added+= addAction(source, fToString); added+= addAction(source, fGenerateConstructorUsingFields); added+= addAction(source, fAddUnimplementedConstructors); source.add(new Separator(GROUP_CODE)); source.add(new Separator(GROUP_EXTERNALIZE)); added+= addAction(source, fExternalizeStrings); return added; }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public GenerateActionGroup(Page page) { this(page.getSite(), null); installQuickAccessAction(); }