Bug 553829: [NiConsole] Add command handler for Context Information
command to console
Change-Id: I66629d4f44f06d597203fddb310371d375e7dc71
diff --git a/r/org.eclipse.statet.nico.ui/src/org/eclipse/statet/nico/ui/console/ConsolePageEditor.java b/r/org.eclipse.statet.nico.ui/src/org/eclipse/statet/nico/ui/console/ConsolePageEditor.java
index feb58e6..e9a0070 100644
--- a/r/org.eclipse.statet.nico.ui/src/org/eclipse/statet/nico/ui/console/ConsolePageEditor.java
+++ b/r/org.eclipse.statet.nico.ui/src/org/eclipse/statet/nico/ui/console/ConsolePageEditor.java
@@ -24,9 +24,7 @@
import org.eclipse.core.commands.IHandler2;
import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.commands.ActionHandler;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentEvent;
@@ -77,7 +75,6 @@
import org.eclipse.statet.ecommons.text.core.util.AbstractFragmentDocument;
import org.eclipse.statet.ecommons.text.ui.InformationDispatchHandler;
import org.eclipse.statet.ecommons.text.ui.TextHandlerUtil;
-import org.eclipse.statet.ecommons.text.ui.TextViewerAction;
import org.eclipse.statet.ecommons.text.ui.TextViewerCustomCaretSupport;
import org.eclipse.statet.ecommons.text.ui.TextViewerEditorColorUpdater;
import org.eclipse.statet.ecommons.ui.ISettingsChangedHandler;
@@ -116,6 +113,7 @@
import org.eclipse.statet.ltk.ui.sourceediting.actions.SelectLineEndHandler;
import org.eclipse.statet.ltk.ui.sourceediting.actions.SelectNextWordHandler;
import org.eclipse.statet.ltk.ui.sourceediting.actions.SelectPreviousWordHandler;
+import org.eclipse.statet.ltk.ui.sourceediting.actions.SourceEditorOperationHandler;
import org.eclipse.statet.ltk.ui.sourceediting.actions.SpecificContentAssistHandler;
import org.eclipse.statet.nico.core.runtime.History;
import org.eclipse.statet.nico.core.runtime.History.Entry;
@@ -681,12 +679,15 @@
}
// Assists
- { final IAction action= new TextViewerAction(getViewer(), ISourceViewer.CONTENTASSIST_PROPOSALS);
- handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(action));
+ { final IHandler2 handler= new SourceEditorOperationHandler(this, ISourceViewer.CONTENTASSIST_PROPOSALS);
+ handlers.addActivate(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, handler);
}
{ final IHandler2 handler= new SpecificContentAssistHandler(this,
this.configurator.getSourceViewerConfiguration().getContentAssist() );
- handlerService.activateHandler(ISourceEditorCommandIds.SPECIFIC_CONTENT_ASSIST_COMMAND_ID, handler);
+ handlers.addActivate(ISourceEditorCommandIds.SPECIFIC_CONTENT_ASSIST_COMMAND_ID, handler);
+ }
+ { final IHandler2 handler= new SourceEditorOperationHandler(this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
+ handlers.addActivate(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION, handler);
}
{ final IHandler2 handler= new InformationDispatchHandler(getViewer());
handlers.addActivate(ITextEditorActionDefinitionIds.SHOW_INFORMATION, handler);