diff --git a/core/org.eclipse.cdt.ui/plugin.properties b/core/org.eclipse.cdt.ui/plugin.properties index 9d91129eef6..4503f1e7bf2 100644 --- a/core/org.eclipse.cdt.ui/plugin.properties +++ b/core/org.eclipse.cdt.ui/plugin.properties @@ -74,6 +74,9 @@ cEditor.description=Editor for C/C++ Source Files category.source.name=C/C++ Source category.source.description= C/C++ Source Actions +ActionDefinition.sourceQuickMenu.name= Show Source Quick Menu +ActionDefinition.sourceQuickMenu.description= Shows the source quick menu + ActionDefinition.comment.name= Comment ActionDefinition.comment.description= Turn the selected lines into // style comments @@ -543,7 +546,19 @@ preferenceKeywords.templates=editor templates snippet macros preferenceKeywords.folding=editor folding section comment header function method statement preprocessor preferenceKeywords.markoccurrences=editor occurrence mark highlight preferenceKeywords.smarttyping=editor typing type close comment tabs indentation indent imports wrap escape semicolons braces brackets parenthesis parentheses strings literals paste pasting tabulator automatically + historyAction.label = History... createScriptAction.label = Create Script... applyScriptAction.label = Apply Script... -renameParticipant.name = Source Folder Rename \ No newline at end of file +renameParticipant.name = Source Folder Rename + +FormatAction.label= &Format +IndentAction.label= Correct &Indentation +AddIncludeAction.label= A&dd Include +CommentAction.label= Co&mment +UncommentAction.label= &Uncomment +ToggleCommentAction.label= Togg&le Comment +AddBlockCommentAction.label= Add &Block Comment +RemoveBlockCommentAction.label= Remove Bloc&k Comment +ShiftRightAction.label= &Shift Right +ShiftLeftAction.label= S&hift Left diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index e88671921aa..6e319c46732 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -1262,28 +1262,6 @@ id="org.eclipse.cdt.ui.actions.ExtractLocalVariable" retarget="true"> - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null if none + */ + public CDTQuickMenuCreator(CEditor editor) { + fEditor= editor; + } + + @Override + protected Point computeMenuLocation(StyledText text) { + if (fEditor == null || text != fEditor.getViewer().getTextWidget()) + return super.computeMenuLocation(text); + return computeWordStart(); + } + + private Point computeWordStart() { + ITextSelection selection= (ITextSelection)fEditor.getSelectionProvider().getSelection(); + IRegion textRegion= CWordFinder.findWord(fEditor.getViewer().getDocument(), selection.getOffset()); + if (textRegion == null) + return null; + + IRegion widgetRegion= modelRange2WidgetRange(textRegion); + if (widgetRegion == null) + return null; + + int start= widgetRegion.getOffset(); + + StyledText styledText= fEditor.getViewer().getTextWidget(); + Point result= styledText.getLocationAtOffset(start); + result.y+= styledText.getLineHeight(start); + + if (!styledText.getClientArea().contains(result)) + return null; + return result; + } + + private IRegion modelRange2WidgetRange(IRegion region) { + ISourceViewer viewer= fEditor.getViewer(); + if (viewer instanceof ITextViewerExtension5) { + ITextViewerExtension5 extension= (ITextViewerExtension5)viewer; + return extension.modelRange2WidgetRange(region); + } + + IRegion visibleRegion= viewer.getVisibleRegion(); + int start= region.getOffset() - visibleRegion.getOffset(); + int end= start + region.getLength(); + if (end > visibleRegion.getLength()) + end= visibleRegion.getLength(); + + return new Region(start, end - start); + } + + /** + * Returns a handler that can create and open the quick menu. + * + * @return a handler that can create and open the quick menu + */ + public IHandler createHandler() { + return new AbstractHandler() { + public Object execute(ExecutionEvent event) throws ExecutionException { + createMenu(); + return null; + } + }; + } + +} diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java index 75a180c8673..165f843fa7c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java @@ -18,17 +18,18 @@ import java.util.ResourceBundle; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator; -import org.eclipse.jface.text.ITextOperationTarget; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.editors.text.TextEditorActionContributor; +import org.eclipse.ui.ide.IDEActionFactory; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.ITextEditorActionConstants; import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; import org.eclipse.ui.texteditor.RetargetTextEditorAction; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.ui.actions.CdtActionConstants; + import org.eclipse.cdt.internal.ui.IContextMenuConstants; import org.eclipse.cdt.internal.ui.actions.FindWordAction; import org.eclipse.cdt.internal.ui.actions.GoToNextPreviousMemberAction; @@ -38,10 +39,6 @@ public class CEditorActionContributor extends TextEditorActionContributor { private RetargetTextEditorAction fContentAssist; private RetargetTextEditorAction fContextInformation; - private RetargetTextEditorAction fFormatter; - private RetargetTextEditorAction fAddInclude; - private RetargetTextEditorAction fShiftLeft; - private RetargetTextEditorAction fShiftRight; private TogglePresentationAction fTogglePresentation; private GotoAnnotationAction fPreviousAnnotation; private GotoAnnotationAction fNextAnnotation; @@ -60,26 +57,12 @@ public class CEditorActionContributor extends TextEditorActionContributor { ResourceBundle bundle = ConstructedCEditorMessages.getResourceBundle(); - fShiftRight= new RetargetTextEditorAction(bundle, "ShiftRight.", ITextOperationTarget.SHIFT_RIGHT); //$NON-NLS-1$ - fShiftRight.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_RIGHT); - CPluginImages.setImageDescriptors(fShiftRight, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_RIGHT); - - fShiftLeft= new RetargetTextEditorAction(bundle, "ShiftLeft.", ITextOperationTarget.SHIFT_LEFT); //$NON-NLS-1$ - fShiftLeft.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_LEFT); - CPluginImages.setImageDescriptors(fShiftLeft, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_LEFT); - fContentAssist = new RetargetTextEditorAction(bundle, "ContentAssistProposal."); //$NON-NLS-1$ fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); fContextInformation = new RetargetTextEditorAction(bundle, "ContentAssistContextInformation."); //$NON-NLS-1$ fContextInformation.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION); - fFormatter = new RetargetTextEditorAction(bundle, "Format."); //$NON-NLS-1$ - fFormatter.setActionDefinitionId(ICEditorActionDefinitionIds.FORMAT); - - fAddInclude = new RetargetTextEditorAction(bundle, "AddIncludeOnSelection."); //$NON-NLS-1$ - fAddInclude.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_INCLUDE); - // actions that are "contributed" to editors, they are considered belonging to the active editor fTogglePresentation= new TogglePresentationAction(); @@ -127,12 +110,12 @@ public class CEditorActionContributor extends TextEditorActionContributor { editMenu.prependToGroup(IWorkbenchActionConstants.FIND_EXT, fFindWord); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fShiftRight); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fShiftLeft); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fFormatter); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, new Separator()); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fAddInclude); - editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, new Separator()); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fShiftRight); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fShiftLeft); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fFormatter); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, new Separator()); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, fAddInclude); +// editMenu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, new Separator()); editMenu.appendToGroup(IContextMenuConstants.GROUP_ADDITIONS, fToggleInsertModeAction); } @@ -183,9 +166,6 @@ public class CEditorActionContributor extends TextEditorActionContributor { if (part instanceof ITextEditor) textEditor= (ITextEditor) part; - fShiftRight.setAction(getAction(textEditor, ITextEditorActionConstants.SHIFT_RIGHT)); - fShiftLeft.setAction(getAction(textEditor, ITextEditorActionConstants.SHIFT_LEFT)); - fTogglePresentation.setEditor(textEditor); fToggleMarkOccurrencesAction.setEditor(textEditor); fPreviousAnnotation.setEditor(textEditor); @@ -193,8 +173,6 @@ public class CEditorActionContributor extends TextEditorActionContributor { fContentAssist.setAction(getAction(textEditor, "ContentAssistProposal")); //$NON-NLS-1$ fContextInformation.setAction(getAction(textEditor, "ContentAssistContextInformation")); //$NON-NLS-1$ - fAddInclude.setAction(getAction(textEditor, "AddIncludeOnSelection")); //$NON-NLS-1$ - fFormatter.setAction(getAction(textEditor, "Format")); //$NON-NLS-1$ fGotoMatchingBracket.setAction(getAction(textEditor, GotoMatchingBracketAction.GOTO_MATCHING_BRACKET)); fGotoNextBookmark.setAction(getAction(textEditor, GotoNextBookmarkAction.NEXT_BOOKMARK)); @@ -206,9 +184,32 @@ public class CEditorActionContributor extends TextEditorActionContributor { fToggleInsertModeAction.setAction(getAction(textEditor, ITextEditorActionConstants.TOGGLE_INSERT_MODE)); fFindWord.setAction(getAction(textEditor, FindWordAction.FIND_WORD)); + // Source menu. + IActionBars bars= getActionBars(); + bars.setGlobalActionHandler(CdtActionConstants.SHIFT_RIGHT, getAction(textEditor, "ShiftRight")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.SHIFT_LEFT, getAction(textEditor, "ShiftLeft")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.COMMENT, getAction(textEditor, "Comment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.UNCOMMENT, getAction(textEditor, "Uncomment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.TOGGLE_COMMENT, getAction(textEditor, "ToggleComment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.FORMAT, getAction(textEditor, "Format")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.ADD_BLOCK_COMMENT, getAction(textEditor, "AddBlockComment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.REMOVE_BLOCK_COMMENT, getAction(textEditor, "RemoveBlockComment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.INDENT, getAction(textEditor, "Indent")); //$NON-NLS-1$ + bars.setGlobalActionHandler(CdtActionConstants.ADD_INCLUDE, getAction(textEditor, "AddIncludeOnSelection")); //$NON-NLS-1$ + + IAction action= getAction(textEditor, ITextEditorActionConstants.REFRESH); + bars.setGlobalActionHandler(ITextEditorActionConstants.REFRESH, action); + + bars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), getAction(textEditor, IDEActionFactory.ADD_TASK.getId())); + bars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(textEditor, IDEActionFactory.BOOKMARK.getId())); + + bars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), getAction(textEditor, IDEActionFactory.OPEN_PROJECT.getId())); + bars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), getAction(textEditor, IDEActionFactory.CLOSE_PROJECT.getId())); + bars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(), getAction(textEditor, IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId())); + if (part instanceof CEditor) { CEditor cEditor= (CEditor) part; - cEditor.fillActionBars(getActionBars()); + cEditor.fillActionBars(bars); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties index d2a3587828d..2cd6a8ba026 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties @@ -44,9 +44,9 @@ ContentAssistContextInformation.label=Parameter &Hints ContentAssistContextInformation.tooltip=Show Parameter Hints ContentAssistContextInformation.description=Show Method Parameter Hints -ToggleComment.label=Comment/Uncomment -ToggleComment.tooltip=Comment/Uncomment For the Selected Lines -ToggleComment.description=Comment/Uncomment for the selected lines +ToggleComment.label=Togg&le Comment +ToggleComment.tooltip=Toggle Comment For the Selected Lines +ToggleComment.description=Toggle Comment for the selected lines AddBlockComment.label=Add &Block Comment AddBlockComment.tooltip=Enclose the Selection in a Block Comment diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java index fa66c53666a..d17549b3031 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.eclipse.core.commands.IHandler; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; @@ -26,22 +27,23 @@ import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IWorkbenchCommandConstants; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.AddBookmarkAction; import org.eclipse.ui.actions.AddTaskAction; +import org.eclipse.ui.handlers.IHandlerActivation; import org.eclipse.ui.handlers.IHandlerService; import org.eclipse.ui.ide.IDEActionFactory; import org.eclipse.ui.part.Page; import org.eclipse.ui.texteditor.ITextEditorActionConstants; import org.eclipse.ui.texteditor.IUpdate; -import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; - import org.eclipse.cdt.ui.refactoring.actions.GettersAndSettersAction; import org.eclipse.cdt.ui.refactoring.actions.ImplementMethodAction; import org.eclipse.cdt.internal.ui.IContextMenuConstants; import org.eclipse.cdt.internal.ui.actions.ActionMessages; +import org.eclipse.cdt.internal.ui.actions.CDTQuickMenuCreator; import org.eclipse.cdt.internal.ui.editor.AddIncludeOnSelectionAction; import org.eclipse.cdt.internal.ui.editor.CEditor; import org.eclipse.cdt.internal.ui.editor.ICEditorActionDefinitionIds; @@ -124,19 +126,11 @@ public class GenerateActionGroup extends ActionGroup { // private FormatAllAction fFormatAll; // private CopyQualifiedNameAction fCopyQualifiedNameAction; // -// private static final String QUICK_MENU_ID= "org.eclipse.cdt.ui.edit.text.c.source.quickMenu"; //$NON-NLS-1$ -// -// private class RefactorQuickAccessAction extends CDTQuickMenuAction { -// public RefactorQuickAccessAction(CEditor editor) { -// super(editor, QUICK_MENU_ID); -// } -// protected void fillMenu(IMenuManager menu) { -// fillQuickMenu(menu); -// } -// } -// -// private RefactorQuickAccessAction fQuickAccessAction; -// private IKeyBindingService fKeyBindingService; + private static final String QUICK_MENU_ID= "org.eclipse.cdt.ui.edit.text.c.source.quickMenu"; //$NON-NLS-1$ + + private IHandlerActivation fQuickAccessHandlerActivation; + private IHandlerService fHandlerService; + /** * Note: This constructor is for internal use only. Clients should not call this constructor. @@ -149,7 +143,7 @@ public class GenerateActionGroup extends ActionGroup { fSite= editor.getSite(); fEditor= editor; fGroupName= groupName; - + fAddInclude= new AddIncludeOnSelectionAction(editor); fAddInclude.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_INCLUDE); editor.setAction("AddIncludeOnSelection", fAddInclude); //$NON-NLS-1$ @@ -207,9 +201,7 @@ public class GenerateActionGroup extends ActionGroup { // fExternalizeStrings.setActionDefinitionId(ICEditorActionDefinitionIds.EXTERNALIZE_STRINGS); // editor.setAction("ExternalizeStrings", fExternalizeStrings); //$NON-NLS-1$ // -// fQuickAccessAction= new RefactorQuickAccessAction(editor); -// fKeyBindingService= editor.getEditorSite().getKeyBindingService(); -// fKeyBindingService.registerAction(fQuickAccessAction); + installQuickAccessAction(); } /** @@ -220,7 +212,7 @@ public class GenerateActionGroup extends ActionGroup { * @param page the page that owns this action group */ public GenerateActionGroup(Page page) { - this(page.getSite(), null); + this(page.getSite()); } /** @@ -231,10 +223,10 @@ public class GenerateActionGroup extends ActionGroup { * @param part the view part that owns this action group */ public GenerateActionGroup(IViewPart part) { - this(part.getSite(), (IHandlerService)part.getSite().getService(IHandlerService.class)); + this(part.getSite()); } - private GenerateActionGroup(IWorkbenchSite site, IHandlerService handlerService) { + private GenerateActionGroup(IWorkbenchSite site) { fSite= site; ISelectionProvider provider= fSite.getSelectionProvider(); ISelection selection= provider.getSelection(); @@ -261,10 +253,10 @@ public class GenerateActionGroup extends ActionGroup { // fAddCppDocStub.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_JAVADOC_COMMENT); fAddBookmark= new AddBookmarkAction(site, true); - fAddBookmark.setActionDefinitionId(IWorkbenchActionDefinitionIds.ADD_BOOKMARK); + fAddBookmark.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_ADD_BOOKMARK); fAddTaskAction= new AddTaskAction(site); - fAddTaskAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.ADD_TASK); + fAddTaskAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_ADD_TASK); // fExternalizeStrings= new ExternalizeStringsAction(site); // fExternalizeStrings.setActionDefinitionId(ICEditorActionDefinitionIds.EXTERNALIZE_STRINGS); @@ -320,13 +312,22 @@ public class GenerateActionGroup extends ActionGroup { registerSelectionListener(provider, fAddTaskAction); // registerSelectionListener(provider, fCleanUp); -// fKeyBindingService= keyBindingService; -// if (fKeyBindingService != null) { -// fQuickAccessAction= new RefactorQuickAccessAction(null); -// fKeyBindingService.registerAction(fQuickAccessAction); -// } + installQuickAccessAction(); } + private void installQuickAccessAction() { + fHandlerService= (IHandlerService)fSite.getService(IHandlerService.class); + if (fHandlerService != null) { + IHandler handler= new CDTQuickMenuCreator(fEditor) { + @Override + protected void fillMenu(IMenuManager menu) { + fillQuickMenu(menu); + } + }.createHandler(); + fQuickAccessHandlerActivation= fHandlerService.activateHandler(QUICK_MENU_ID, handler); + } + } + private void registerSelectionListener(ISelectionProvider provider, ISelectionChangedListener listener) { if (fRegisteredSelectionListeners == null) fRegisteredSelectionListeners= new ArrayList(10); @@ -361,11 +362,8 @@ public class GenerateActionGroup extends ActionGroup { @Override public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); - String menuText= ActionMessages.getString("SourceMenu_label"); //$NON-NLS-1$ -// if (fQuickAccessAction != null) { -// menuText= fQuickAccessAction.addShortcut(menuText); -// } - IMenuManager subMenu= new MenuManager(menuText, MENU_ID); + MenuManager subMenu= new MenuManager(ActionMessages.getString("SourceMenu_label"), MENU_ID); //$NON-NLS-1$ + subMenu.setActionDefinitionId(QUICK_MENU_ID); int added= 0; if (isEditorOwner()) { added= fillEditorSubMenu(subMenu); @@ -376,13 +374,13 @@ public class GenerateActionGroup extends ActionGroup { menu.appendToGroup(fGroupName, subMenu); } -// private void fillQuickMenu(IMenuManager menu) { -// if (isEditorOwner()) { -// fillEditorSubMenu(menu); -// } else { -// fillViewSubMenu(menu); -// } -// } + private void fillQuickMenu(IMenuManager menu) { + if (isEditorOwner()) { + fillEditorSubMenu(menu); + } else { + fillViewSubMenu(menu); + } + } private int fillEditorSubMenu(IMenuManager source) { int added= 0; @@ -402,7 +400,6 @@ public class GenerateActionGroup extends ActionGroup { // added+= addAction(source, fSortMembers); // added+= addAction(source, fCleanUp); source.add(new Separator(GROUP_GENERATE)); - added+= addEditorAction(source, "ContentAssistProposal"); //$NON-NLS-1$ // added+= addAction(source, fOverrideMethods); added+= addAction(source, fAddGetterSetter); added+= addAction(source, fImplementMethod); @@ -454,9 +451,9 @@ public class GenerateActionGroup extends ActionGroup { provider.removeSelectionChangedListener(listener); } } -// if (fQuickAccessAction != null && fKeyBindingService != null) { -// fKeyBindingService.unregisterAction(fQuickAccessAction); -// } + if (fQuickAccessHandlerActivation != null && fHandlerService != null) { + fHandlerService.deactivateHandler(fQuickAccessHandlerActivation); + } fEditor= null; super.dispose(); }