[Actions] Consolidate command definitions in LtkActions
Change-Id: I5b4303b8e6df6706afec82fa3eddf2b7c2ffed1b
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LTKUI.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LTKUI.java
index 7805779..970765f 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LTKUI.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LTKUI.java
@@ -25,90 +25,6 @@
public class LTKUI {
- /**
- * ID of command 'insert assignment'.
- *
- * Value: @value
- */
- public static final String INSERT_ASSIGNMENT_COMMAND_ID= "org.eclipse.statet.ltk.commands.InsertAssignment"; //$NON-NLS-1$
-
- /**
- * ID of command 'strip comments'.
- *
- * Value: @value
- */
- public static final String STRIP_COMMENTS_COMMAND_ID= "org.eclipse.statet.ltk.commands.StripComments"; //$NON-NLS-1$
-
- /**
- * ID of command 'add doc comment'.
- *
- * Value: @value
- */
- public static final String ADD_DOC_COMMENT_COMMAND_ID= "org.eclipse.statet.ltk.commands.AddDocComment"; //$NON-NLS-1$
-
- /**
- * ID of command 'generate element comment'.
- *
- * Value: @value
- */
- public static final String GENERATE_ELEMENT_COMMENT_COMMAND_ID= "org.eclipse.statet.ltk.commands.GenerateElementComment"; //$NON-NLS-1$
-
- /**
- * ID of command 'correct indentation'.
- *
- * Value: @value
- */
- public static final String CORRECT_INDENT_COMMAND_ID= "org.eclipse.statet.ltk.commands.CorrectIndent"; //$NON-NLS-1$
-
-
- /**
- * ID of command to show quick outline.
- *
- * Value: @value
- */
- public static final String SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID= "org.eclipse.statet.ltk.commands.ShowQuickSourceOutline"; //$NON-NLS-1$
-
- /**
- * ID of command to show quick element structure.
- *
- * Value: @value
- */
- public static final String SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID= "org.eclipse.statet.ltk.commands.ShowQuickElementOutline"; //$NON-NLS-1$
-
- /**
- * ID of command to show quick element hierarchy.
- *
- * Value: @value
- */
- public static final String SHOW_QUICK_ELEMENT_HIERARCHY_COMMAND_ID= "org.eclipse.statet.ltk.commands.ShowQuickElementHierarchy"; //$NON-NLS-1$
-
-
- /**
- * ID of command to search for access (all occurrences) of an element.
- *
- * Value: @value
- */
- public static final String SEARCH_ALL_ELEMENT_ACCESS_COMMAND_ID= "org.eclipse.statet.ltk.commands.SearchAllElementAccess"; //$NON-NLS-1$
-
- /**
- * ID of command to search for write access of an element.
- *
- * Value: @value
- */
- public static final String SEARCH_WRITE_ELEMENT_ACCESS_COMMAND_ID= "org.eclipse.statet.ltk.commands.SearchWriteElementAccess"; //$NON-NLS-1$
-
- /**
- * Name of command parameter defining the scope of a search.
- *
- * Value: @value
- */
- public static final String SEARCH_SCOPE_PARAMETER_ID= "scope"; //$NON-NLS-1$
-
- public static final String SEARCH_SCOPE_WORKSPACE_PARAMETER_VALUE= "workspace"; //$NON-NLS-1$
- public static final String SEARCH_SCOPE_PROJECT_PARAMETER_VALUE= "project"; //$NON-NLS-1$
- public static final String SEARCH_SCOPE_FILE_PARAMETER_VALUE= "file"; //$NON-NLS-1$
-
-
public static final String OBJ_TEXT_TEMPLATE_IMAGE_ID= LTKUIPlugin.BUNDLE_ID + "/image/obj/text.template"; //$NON-NLS-1$
public static final String OBJ_TEXT_AT_TAG_IMAGE_ID= LTKUIPlugin.BUNDLE_ID + "/image/obj/text.at_tag"; //$NON-NLS-1$
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LtkActions.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LtkActions.java
new file mode 100644
index 0000000..d7c913c
--- /dev/null
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/LtkActions.java
@@ -0,0 +1,209 @@
+/*=============================================================================#
+ # Copyright (c) 2009, 2021 Stephan Wahlbrink and others.
+ #
+ # This program and the accompanying materials are made available under the
+ # terms of the Eclipse Public License 2.0 which is available at
+ # https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
+ # which is available at https://www.apache.org/licenses/LICENSE-2.0.
+ #
+ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
+ #
+ # Contributors:
+ # Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
+ #=============================================================================*/
+
+package org.eclipse.statet.ltk.ui;
+
+
+/**
+ *
+ * @see org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds
+ */
+public class LtkActions {
+
+
+//--Edit--
+
+ /**
+ * ID of command [Edit] 'Copy (Qualified) Element Name'.
+ *
+ * Value: @value
+ */
+ public static final String COPY_ELEMENT_NAME_COMMAND_ID=
+ "org.eclipse.statet.workbench.commands.CopyElementName"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Edit > Expand Selection] 'Select Enclosing Element'.
+ *
+ * Value: @value
+ */
+ public static final String SELECT_ENCLOSING_COMMAND_ID=
+ "org.eclipse.statet.workbench.commands.SelectExpandEnclosing"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Edit > Expand Selection] 'Select Next Element'.
+ *
+ * Value: @value
+ */
+ public static final String SELECT_NEXT_COMMAND_ID=
+ "org.eclipse.statet.workbench.commands.SelectExpandNext"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Edit > Expand Selection] 'Select Previous Element'.
+ *
+ * Value: @value
+ */
+ public static final String SELECT_PREVIOUS_COMMAND_ID=
+ "org.eclipse.statet.workbench.commands.SelectExpandPrevious"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Edit > Expand Selection] 'Restore Last Selection'.
+ *
+ * Value: @value
+ */
+ public static final String SELECT_LAST_COMMAND_ID=
+ "org.eclipse.statet.workbench.commands.SelectLast"; //$NON-NLS-1$
+
+
+//--Navigation--
+
+ /**
+ * ID of command [Navigate] 'Go to Matching Bracket'.
+ *
+ * Value: @value
+ */
+ public static final String GOTO_MATCHING_BRACKET_COMMAND_ID=
+ "org.eclipse.statet.ecommons.text.commands.GotoMatchingBracket"; //$NON-NLS-1$
+
+
+//--Show--
+
+ /**
+ * ID of command 'Show Quick Outline'.
+ *
+ * Value: @value
+ */
+ public static final String SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.ShowQuickSourceOutline"; //$NON-NLS-1$
+
+ /**
+ * ID of command 'Show Quick Element Structure'.
+ *
+ * Value: @value
+ */
+ public static final String SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.ShowQuickElementOutline"; //$NON-NLS-1$
+
+ /**
+ * ID of command 'Show Quick Element Hierarchy'.
+ *
+ * Value: @value
+ */
+ public static final String SHOW_QUICK_ELEMENT_HIERARCHY_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.ShowQuickElementHierarchy"; //$NON-NLS-1$
+
+
+//--Edit Source (Assists)--
+
+ /**
+ * ID for command to invoke a specific content assist (with a single content assist category).
+ *
+ * Command required attribute {@link #SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID}.
+ */
+ public static final String SPECIFIC_CONTENT_ASSIST_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.SpecificContentAssist"; //$NON-NLS-1$
+
+ /**
+ * ID for command parameter for {@link #SPECIFIC_CONTENT_ASSIST_COMMAND_ID} specifying the category to show.
+ */
+ public static final String SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID= "categoryId"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Toggle Comment'.
+ *
+ * Value: @value
+ */
+ public static final String TOGGLE_COMMENT=
+ "org.eclipse.statet.ltk.commands.ToggleComment"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Strip Comments'.
+ *
+ * Value: @value
+ */
+ public static final String STRIP_COMMENTS_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.StripComments"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Add Doc Comment'.
+ *
+ * Value: @value
+ */
+ public static final String ADD_DOC_COMMENT_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.AddDocComment"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Generate Element Comment'.
+ *
+ * Value: @value
+ */
+ public static final String GENERATE_ELEMENT_COMMENT_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.GenerateElementComment"; //$NON-NLS-1$
+
+
+ /**
+ * ID of command [Source] 'Insert Assignment'.
+ *
+ * Value: @value
+ */
+ public static final String INSERT_ASSIGNMENT_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.InsertAssignment"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Correct Indentation'.
+ *
+ * Value: @value
+ */
+ public static final String CORRECT_INDENT_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.CorrectIndent"; //$NON-NLS-1$
+
+ /**
+ * ID of command [Source] 'Correct Line Wrap'.
+ *
+ * Value: @value
+ */
+ public static final String CORRECT_LINE_WRAP_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.CorrectLineWrap"; //$NON-NLS-1$
+
+
+//--Search--
+
+ /**
+ * ID of command to search for access (all occurrences) of an element.
+ *
+ * Value: @value
+ */
+ public static final String SEARCH_ALL_ELEMENT_ACCESS_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.SearchAllElementAccess"; //$NON-NLS-1$
+
+ /**
+ * ID of command to search for write access of an element.
+ *
+ * Value: @value
+ */
+ public static final String SEARCH_WRITE_ELEMENT_ACCESS_COMMAND_ID=
+ "org.eclipse.statet.ltk.commands.SearchWriteElementAccess"; //$NON-NLS-1$
+
+ /**
+ * Name of command parameter defining the scope of a search.
+ *
+ * Value: @value
+ */
+ public static final String SEARCH_SCOPE_PARAMETER_ID= "scope"; //$NON-NLS-1$
+
+ public static final String SEARCH_SCOPE_WORKSPACE_PARAMETER_VALUE= "workspace"; //$NON-NLS-1$
+ public static final String SEARCH_SCOPE_PROJECT_PARAMETER_VALUE= "project"; //$NON-NLS-1$
+ public static final String SEARCH_SCOPE_FILE_PARAMETER_VALUE= "file"; //$NON-NLS-1$
+
+
+}
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/ISourceEditorCommandIds.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/ISourceEditorCommandIds.java
deleted file mode 100644
index aaa750f..0000000
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/ISourceEditorCommandIds.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*=============================================================================#
- # Copyright (c) 2009, 2021 Stephan Wahlbrink and others.
- #
- # This program and the accompanying materials are made available under the
- # terms of the Eclipse Public License 2.0 which is available at
- # https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
- # which is available at https://www.apache.org/licenses/LICENSE-2.0.
- #
- # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
- #
- # Contributors:
- # Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
- #=============================================================================*/
-
-package org.eclipse.statet.ltk.ui.sourceediting;
-
-
-/**
- *
- * @see org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds
- */
-public interface ISourceEditorCommandIds {
-
-
-//--Edit--
-
- /**
- * Action definition ID of the 'edit' > 'copy (qualified) (element) name' action
- *
- * Value: @value
- */
- public static final String COPY_ELEMENT_NAME= "org.eclipse.statet.workbench.commands.CopyElementName"; //$NON-NLS-1$
-
-//--Navigation--
-
- /**
- * Action definition ID of the 'navigate' > 'go to matching bracket' action
- *
- * Value: @value
- */
- public static final String GOTO_MATCHING_BRACKET= "org.eclipse.statet.ecommons.text.commands.GotoMatchingBracket"; //$NON-NLS-1$
-
- /**
- * Action definition ID of the edit -> select enclosing action
- *
- * Value: @value
- */
- public static final String SELECT_ENCLOSING= "org.eclipse.statet.workbench.commands.SelectExpandEnclosing"; //$NON-NLS-1$
-
- /**
- * Action definition ID of the edit -> select next action
- *
- * Value: @value
- */
- public static final String SELECT_NEXT= "org.eclipse.statet.workbench.commands.SelectExpandNext"; //$NON-NLS-1$
-
- /**
- * Action definition ID of the edit -> select previous action
- *
- * Value: @value
- */
- public static final String SELECT_PREVIOUS= "org.eclipse.statet.workbench.commands.SelectExpandPrevious"; //$NON-NLS-1$
-
- /**
- * Action definition ID of the edit -> select restore last action
- *
- * Value: @value
- */
- public static final String SELECT_LAST= "org.eclipse.statet.workbench.commands.SelectLast"; //$NON-NLS-1$
-
- /**
- * ID for command to invoke a specific content assist (with a single content assist category).
- *
- * Command required attribute {@link #SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID}.
- */
- public static final String SPECIFIC_CONTENT_ASSIST_COMMAND_ID= "org.eclipse.statet.ltk.commands.SpecificContentAssist"; //$NON-NLS-1$
-
- /**
- * ID for command parameter for {@link #SPECIFIC_CONTENT_ASSIST_COMMAND_ID} specifying the category to show.
- */
- public static final String SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID= "categoryId"; //$NON-NLS-1$
-
-
- /**
- * Action definition ID of the 'source' > 'toggle comment' action
- *
- * Value: @value
- */
- public static final String TOGGLE_COMMENT= "org.eclipse.statet.ltk.commands.ToggleComment"; //$NON-NLS-1$
-
-}
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickInformationProvider.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickInformationProvider.java
index 3eb46ef..2efd44b 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickInformationProvider.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickInformationProvider.java
@@ -32,7 +32,7 @@
import org.eclipse.statet.ltk.model.core.ModelManager;
import org.eclipse.statet.ltk.model.core.element.SourceUnit;
import org.eclipse.statet.ltk.model.core.element.SourceUnitModelInfo;
-import org.eclipse.statet.ltk.ui.LTKUI;
+import org.eclipse.statet.ltk.ui.LtkActions;
@NonNullByDefault
@@ -44,11 +44,11 @@
private static String textOperation2commandId(final int operation) {
switch (operation) {
case SourceEditorViewer.SHOW_SOURCE_OUTLINE:
- return LTKUI.SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID;
+ return LtkActions.SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID;
case SourceEditorViewer.SHOW_ELEMENT_OUTLINE:
- return LTKUI.SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID;
+ return LtkActions.SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID;
case SourceEditorViewer.SHOW_ELEMENT_HIERARCHY:
- return LTKUI.SHOW_QUICK_ELEMENT_HIERARCHY_COMMAND_ID;
+ return LtkActions.SHOW_QUICK_ELEMENT_HIERARCHY_COMMAND_ID;
default:
throw new UnsupportedOperationException(Integer.toString(operation));
}
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickOutlineInformationControl.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickOutlineInformationControl.java
index 6b5056b..920d66c 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickOutlineInformationControl.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/QuickOutlineInformationControl.java
@@ -34,7 +34,7 @@
import org.eclipse.statet.ltk.model.core.element.SourceStructElement;
import org.eclipse.statet.ltk.model.core.element.SourceUnit;
import org.eclipse.statet.ltk.model.core.element.SourceUnitModelInfo;
-import org.eclipse.statet.ltk.ui.LTKUI;
+import org.eclipse.statet.ltk.ui.LtkActions;
import org.eclipse.statet.ltk.ui.sourceediting.actions.OpenDeclaration;
@@ -99,10 +99,10 @@
@Override
protected String getDescription(final int page) {
- if (getCommandId() == LTKUI.SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID) {
+ if (getCommandId() == LtkActions.SHOW_QUICK_SOURCE_OUTLINE_COMMAND_ID) {
return "Document Outline";
}
- if (getCommandId() == LTKUI.SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID) {
+ if (getCommandId() == LtkActions.SHOW_QUICK_ELEMENT_OUTLINE_COMMAND_ID) {
return "Object Outline";
}
return ""; //$NON-NLS-1$
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor1.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor1.java
index 1d592bd..580c037 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor1.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor1.java
@@ -105,7 +105,7 @@
import org.eclipse.statet.ltk.model.core.element.SourceUnitModelInfo;
import org.eclipse.statet.ltk.ui.ElementInfoController;
import org.eclipse.statet.ltk.ui.LTKInputData;
-import org.eclipse.statet.ltk.ui.LTKUI;
+import org.eclipse.statet.ltk.ui.LtkActions;
import org.eclipse.statet.ltk.ui.ModelElementInputProvider;
import org.eclipse.statet.ltk.ui.PostSelectionCancelExtension;
import org.eclipse.statet.ltk.ui.PostSelectionWithElementInfoController;
@@ -820,22 +820,22 @@
final ICharPairMatcher matcher= this.configurator.getSourceViewerConfiguration().getPairMatcher();
if (matcher != null) {
- handlerService.activateHandler(ISourceEditorCommandIds.GOTO_MATCHING_BRACKET,
+ handlerService.activateHandler(LtkActions.GOTO_MATCHING_BRACKET_COMMAND_ID,
new GotoMatchingBracketHandler(matcher, this));
}
{ final IHandler2 handler= new SpecificContentAssistHandler(this,
this.configurator.getSourceViewerConfiguration().getContentAssist() );
- handlerService.activateHandler(ISourceEditorCommandIds.SPECIFIC_CONTENT_ASSIST_COMMAND_ID, handler);
+ handlerService.activateHandler(LtkActions.SPECIFIC_CONTENT_ASSIST_COMMAND_ID, handler);
}
{ final IHandler2 handler= createToggleCommentHandler();
if (handler != null) {
- handlerService.activateHandler(ISourceEditorCommandIds.TOGGLE_COMMENT, handler);
+ handlerService.activateHandler(LtkActions.TOGGLE_COMMENT, handler);
}
}
{ final IHandler2 handler= createCorrectIndentHandler();
if (handler != null) {
- handlerService.activateHandler(LTKUI.CORRECT_INDENT_COMMAND_ID, handler);
+ handlerService.activateHandler(LtkActions.CORRECT_INDENT_COMMAND_ID, handler);
}
}
@@ -844,14 +844,14 @@
}
if (this.modelProvider != null) {
this.selectionHistory= new StructureSelectionHistory(this);
- handlerService.activateHandler(ISourceEditorCommandIds.SELECT_ENCLOSING,
+ handlerService.activateHandler(LtkActions.SELECT_ENCLOSING_COMMAND_ID,
new StructureSelectHandler.Enclosing(this, this.selectionHistory));
- handlerService.activateHandler(ISourceEditorCommandIds.SELECT_PREVIOUS,
+ handlerService.activateHandler(LtkActions.SELECT_PREVIOUS_COMMAND_ID,
new StructureSelectHandler.Previous(this, this.selectionHistory));
- handlerService.activateHandler(ISourceEditorCommandIds.SELECT_NEXT,
+ handlerService.activateHandler(LtkActions.SELECT_NEXT_COMMAND_ID,
new StructureSelectHandler.Next(this, this.selectionHistory));
final StructureSelectionHistoryBackHandler backHandler= new StructureSelectionHistoryBackHandler(this, this.selectionHistory);
- handlerService.activateHandler(ISourceEditorCommandIds.SELECT_LAST, backHandler);
+ handlerService.activateHandler(LtkActions.SELECT_LAST_COMMAND_ID, backHandler);
this.selectionHistory.addUpdateListener(backHandler);
}
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor2OutlinePage.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor2OutlinePage.java
index eb4743e..692fc86 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor2OutlinePage.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/SourceEditor2OutlinePage.java
@@ -35,6 +35,7 @@
import org.eclipse.statet.ltk.model.core.element.SourceStructElement;
import org.eclipse.statet.ltk.refactoring.core.CommonRefactoringFactory;
import org.eclipse.statet.ltk.refactoring.core.RefactoringAdapter;
+import org.eclipse.statet.ltk.ui.LtkActions;
import org.eclipse.statet.ltk.ui.refactoring.AbstractElementsHandler;
import org.eclipse.statet.ltk.ui.refactoring.CopyElementsHandler;
import org.eclipse.statet.ltk.ui.refactoring.CopyNamesHandler;
@@ -107,7 +108,7 @@
registerHandlerToUpdate(handler);
}
{ final AbstractElementsHandler handler= new CopyNamesHandler(this.refactoring);
- handlers.addActivate(ISourceEditorCommandIds.COPY_ELEMENT_NAME, handler);
+ handlers.addActivate(LtkActions.COPY_ELEMENT_NAME_COMMAND_ID, handler);
registerHandlerToUpdate(handler);
}
{ final AbstractElementsHandler handler= new PasteElementsHandler(getSourceEditor(), this.refactoring);
@@ -135,7 +136,7 @@
CommandContributionItem.STYLE_PUSH )));
menuManager.add(new CommandContributionItem(
new CommandContributionItemParameter(site,
- null, ISourceEditorCommandIds.COPY_ELEMENT_NAME,
+ null, LtkActions.COPY_ELEMENT_NAME_COMMAND_ID,
CommandContributionItem.STYLE_PUSH )));
menuManager.add(new CommandContributionItem(
new CommandContributionItemParameter(site,
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/actions/SpecificContentAssistHandler.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/actions/SpecificContentAssistHandler.java
index f97528a..a0c4a51 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/actions/SpecificContentAssistHandler.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/actions/SpecificContentAssistHandler.java
@@ -24,7 +24,7 @@
import org.eclipse.statet.ecommons.ui.util.UIAccess;
-import org.eclipse.statet.ltk.ui.sourceediting.ISourceEditorCommandIds;
+import org.eclipse.statet.ltk.ui.LtkActions;
import org.eclipse.statet.ltk.ui.sourceediting.SourceEditor;
import org.eclipse.statet.ltk.ui.sourceediting.assist.ContentAssist;
@@ -59,7 +59,7 @@
*/
@Override
public @Nullable Object execute(final ExecutionEvent event) throws ExecutionException {
- final String par= event.getParameter(ISourceEditorCommandIds.SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID);
+ final String par= event.getParameter(LtkActions.SPECIFIC_CONTENT_ASSIST_CATEGORY_PARAMETER_ID);
if (par == null) {
return null;
}
diff --git a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/assist/AdvancedContentAssistConfigurationBlock.java b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/assist/AdvancedContentAssistConfigurationBlock.java
index a8a91b5..9fa2bc6 100644
--- a/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/assist/AdvancedContentAssistConfigurationBlock.java
+++ b/ltk/org.eclipse.statet.ltk.ui/src/org/eclipse/statet/ltk/ui/sourceediting/assist/AdvancedContentAssistConfigurationBlock.java
@@ -64,7 +64,7 @@
import org.eclipse.statet.ecommons.ui.viewers.ViewerUtils.CheckboxTableComposite;
import org.eclipse.statet.internal.ltk.ui.EditingMessages;
-import org.eclipse.statet.ltk.ui.sourceediting.ISourceEditorCommandIds;
+import org.eclipse.statet.ltk.ui.LtkActions;
public class AdvancedContentAssistConfigurationBlock extends ManagedConfigurationBlock {
@@ -104,7 +104,7 @@
this.registry= registry;
final ICommandService commandSvc= PlatformUI.getWorkbench().getAdapter(ICommandService.class);
- this.specificCommand= commandSvc.getCommand(ISourceEditorCommandIds.SPECIFIC_CONTENT_ASSIST_COMMAND_ID);
+ this.specificCommand= commandSvc.getCommand(LtkActions.SPECIFIC_CONTENT_ASSIST_COMMAND_ID);
}
private void prepareKeybindingInfo() {