Editor: move setScriptable to context actions

The scriptable info is saved to the action registered for a specific context
so we need to add this info to the action builder in the text editor that has the correct context.

Also remove all action builder constructs for the global context that have been registered before
in order to silence the add override action warning.

Change-Id: I631d71ba5eb8e975190713b33827926e868da295
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2024-04-10 11:24:32 +02:00
parent 698488fc05
commit ec3a5b5fd0
2 changed files with 367 additions and 398 deletions

View File

@@ -3872,29 +3872,35 @@ void TextEditorWidgetPrivate::registerActions()
m_undoAction = ActionBuilder(this, UNDO) m_undoAction = ActionBuilder(this, UNDO)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->undo(); }) .addOnTriggered([this] { q->undo(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_redoAction = ActionBuilder(this, REDO) m_redoAction = ActionBuilder(this, REDO)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->redo(); }) .addOnTriggered([this] { q->redo(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_copyAction = ActionBuilder(this, COPY) m_copyAction = ActionBuilder(this, COPY)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->copy(); }) .addOnTriggered([this] { q->copy(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_cutAction = ActionBuilder(this, CUT) m_cutAction = ActionBuilder(this, CUT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->cut(); }) .addOnTriggered([this] { q->cut(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, PASTE) m_modifyingActions << ActionBuilder(this, PASTE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->paste(); }) .addOnTriggered([this] { q->paste(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, SELECTALL) ActionBuilder(this, SELECTALL)
.setContext(m_editorContext) .setContext(m_editorContext)
.setScriptable(true)
.addOnTriggered([this] { q->selectAll(); }); .addOnTriggered([this] { q->selectAll(); });
ActionBuilder(this, GOTO) ActionBuilder(this, GOTO).setContext(m_editorContext).addOnTriggered([] {
.setContext(m_editorContext) LocatorManager::showFilter(lineNumberFilter());
.addOnTriggered([] { LocatorManager::showFilter(lineNumberFilter()); }); });
ActionBuilder(this, PRINT) ActionBuilder(this, PRINT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->print(ICore::printer()); }) .addOnTriggered([this] { q->print(ICore::printer()); })
@@ -3902,64 +3908,80 @@ void TextEditorWidgetPrivate::registerActions()
m_modifyingActions << ActionBuilder(this, DELETE_LINE) m_modifyingActions << ActionBuilder(this, DELETE_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteLine(); }) .addOnTriggered([this] { q->deleteLine(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_END_OF_LINE) m_modifyingActions << ActionBuilder(this, DELETE_END_OF_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteEndOfLine(); }) .addOnTriggered([this] { q->deleteEndOfLine(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_END_OF_WORD) m_modifyingActions << ActionBuilder(this, DELETE_END_OF_WORD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteEndOfWord(); }) .addOnTriggered([this] { q->deleteEndOfWord(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_END_OF_WORD_CAMEL_CASE) m_modifyingActions << ActionBuilder(this, DELETE_END_OF_WORD_CAMEL_CASE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteEndOfWordCamelCase(); }) .addOnTriggered([this] { q->deleteEndOfWordCamelCase(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_START_OF_LINE) m_modifyingActions << ActionBuilder(this, DELETE_START_OF_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteStartOfLine(); }) .addOnTriggered([this] { q->deleteStartOfLine(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_START_OF_WORD) m_modifyingActions << ActionBuilder(this, DELETE_START_OF_WORD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteStartOfWord(); }) .addOnTriggered([this] { q->deleteStartOfWord(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DELETE_START_OF_WORD_CAMEL_CASE) m_modifyingActions << ActionBuilder(this, DELETE_START_OF_WORD_CAMEL_CASE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->deleteStartOfWordCamelCase(); }) .addOnTriggered([this] { q->deleteStartOfWordCamelCase(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, GOTO_BLOCK_START_WITH_SELECTION) ActionBuilder(this, GOTO_BLOCK_START_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoBlockStartWithSelection(); }); .addOnTriggered([this] { q->gotoBlockStartWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_BLOCK_END_WITH_SELECTION) ActionBuilder(this, GOTO_BLOCK_END_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoBlockEndWithSelection(); }); .addOnTriggered([this] { q->gotoBlockEndWithSelection(); })
.setScriptable(true);
m_modifyingActions << ActionBuilder(this, MOVE_LINE_UP) m_modifyingActions << ActionBuilder(this, MOVE_LINE_UP)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->moveLineUp(); }) .addOnTriggered([this] { q->moveLineUp(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, MOVE_LINE_DOWN) m_modifyingActions << ActionBuilder(this, MOVE_LINE_DOWN)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->moveLineDown(); }) .addOnTriggered([this] { q->moveLineDown(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, COPY_LINE_UP) m_modifyingActions << ActionBuilder(this, COPY_LINE_UP)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->copyLineUp(); }) .addOnTriggered([this] { q->copyLineUp(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, COPY_LINE_DOWN) m_modifyingActions << ActionBuilder(this, COPY_LINE_DOWN)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->copyLineDown(); }) .addOnTriggered([this] { q->copyLineDown(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, JOIN_LINES) m_modifyingActions << ActionBuilder(this, JOIN_LINES)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->joinLines(); }) .addOnTriggered([this] { q->joinLines(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, INSERT_LINE_ABOVE) m_modifyingActions << ActionBuilder(this, INSERT_LINE_ABOVE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->insertLineAbove(); }) .addOnTriggered([this] { q->insertLineAbove(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, INSERT_LINE_BELOW) m_modifyingActions << ActionBuilder(this, INSERT_LINE_BELOW)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->insertLineBelow(); }) .addOnTriggered([this] { q->insertLineBelow(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, SWITCH_UTF8BOM) m_modifyingActions << ActionBuilder(this, SWITCH_UTF8BOM)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -3968,10 +3990,12 @@ void TextEditorWidgetPrivate::registerActions()
m_modifyingActions << ActionBuilder(this, INDENT) m_modifyingActions << ActionBuilder(this, INDENT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->indent(); }) .addOnTriggered([this] { q->indent(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, UNINDENT) m_modifyingActions << ActionBuilder(this, UNINDENT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->unindent(); }) .addOnTriggered([this] { q->unindent(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_followSymbolAction = ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR) m_followSymbolAction = ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -3979,7 +4003,8 @@ void TextEditorWidgetPrivate::registerActions()
.contextAction(); .contextAction();
m_followSymbolInNextSplitAction = ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT) m_followSymbolInNextSplitAction = ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->openLinkUnderCursorInNextSplit(); }) .addOnTriggered(
[this] { q->openLinkUnderCursorInNextSplit(); })
.contextAction(); .contextAction();
m_followToTypeAction = ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE) m_followToTypeAction = ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -3987,7 +4012,8 @@ void TextEditorWidgetPrivate::registerActions()
.contextAction(); .contextAction();
m_followToTypeInNextSplitAction = ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE_IN_NEXT_SPLIT) m_followToTypeInNextSplitAction = ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE_IN_NEXT_SPLIT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->openTypeUnderCursorInNextSplit(); }) .addOnTriggered(
[this] { q->openTypeUnderCursorInNextSplit(); })
.contextAction(); .contextAction();
m_findUsageAction = ActionBuilder(this, FIND_USAGES) m_findUsageAction = ActionBuilder(this, FIND_USAGES)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -4003,11 +4029,13 @@ void TextEditorWidgetPrivate::registerActions()
.contextAction(); .contextAction();
m_jumpToFileInNextSplitAction = ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT) m_jumpToFileInNextSplitAction = ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->openLinkUnderCursorInNextSplit(); }) .addOnTriggered(
[this] { q->openLinkUnderCursorInNextSplit(); })
.contextAction(); .contextAction();
m_openCallHierarchyAction = ActionBuilder(this, OPEN_CALL_HIERARCHY) m_openCallHierarchyAction = ActionBuilder(this, OPEN_CALL_HIERARCHY)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->openCallHierarchy(); }) .addOnTriggered([this] { q->openCallHierarchy(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_openTypeHierarchyAction = ActionBuilder(this, OPEN_TYPE_HIERARCHY) m_openTypeHierarchyAction = ActionBuilder(this, OPEN_TYPE_HIERARCHY)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -4015,23 +4043,28 @@ void TextEditorWidgetPrivate::registerActions()
updateTypeHierarchy(NavigationWidget::activateSubWidget( updateTypeHierarchy(NavigationWidget::activateSubWidget(
Constants::TYPE_HIERARCHY_FACTORY_ID, Side::Left)); Constants::TYPE_HIERARCHY_FACTORY_ID, Side::Left));
}) })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, VIEW_PAGE_UP) ActionBuilder(this, VIEW_PAGE_UP)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->viewPageUp(); }); .addOnTriggered([this] { q->viewPageUp(); })
.setScriptable(true);
ActionBuilder(this, VIEW_PAGE_DOWN) ActionBuilder(this, VIEW_PAGE_DOWN)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->viewPageDown(); }); .addOnTriggered([this] { q->viewPageDown(); })
.setScriptable(true);
ActionBuilder(this, VIEW_LINE_UP) ActionBuilder(this, VIEW_LINE_UP)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->viewLineUp(); }); .addOnTriggered([this] { q->viewLineUp(); })
.setScriptable(true);
ActionBuilder(this, VIEW_LINE_DOWN) ActionBuilder(this, VIEW_LINE_DOWN)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->viewLineDown(); }); .addOnTriggered([this] { q->viewLineDown(); })
.setScriptable(true);
ActionBuilder(this, SELECT_ENCODING) ActionBuilder(this, SELECT_ENCODING).setContext(m_editorContext).addOnTriggered([this] {
.setContext(m_editorContext) q->selectEncoding();
.addOnTriggered([this] { q->selectEncoding(); }); });
m_modifyingActions << ActionBuilder(this, CIRCULAR_PASTE) m_modifyingActions << ActionBuilder(this, CIRCULAR_PASTE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->circularPaste(); }) .addOnTriggered([this] { q->circularPaste(); })
@@ -4039,19 +4072,23 @@ void TextEditorWidgetPrivate::registerActions()
m_modifyingActions << ActionBuilder(this, NO_FORMAT_PASTE) m_modifyingActions << ActionBuilder(this, NO_FORMAT_PASTE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->pasteWithoutFormat(); }) .addOnTriggered([this] { q->pasteWithoutFormat(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_autoIndentAction = ActionBuilder(this, AUTO_INDENT_SELECTION) m_autoIndentAction = ActionBuilder(this, AUTO_INDENT_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->autoIndent(); }) .addOnTriggered([this] { q->autoIndent(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_autoFormatAction = ActionBuilder(this, AUTO_FORMAT_SELECTION) m_autoFormatAction = ActionBuilder(this, AUTO_FORMAT_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->autoFormat(); }) .addOnTriggered([this] { q->autoFormat(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, REWRAP_PARAGRAPH) m_modifyingActions << ActionBuilder(this, REWRAP_PARAGRAPH)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->rewrapParagraph(); }) .addOnTriggered([this] { q->rewrapParagraph(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_visualizeWhitespaceAction = ActionBuilder(this, VISUALIZE_WHITESPACE) m_visualizeWhitespaceAction = ActionBuilder(this, VISUALIZE_WHITESPACE)
.setContext(m_editorContext) .setContext(m_editorContext)
@@ -4066,10 +4103,13 @@ void TextEditorWidgetPrivate::registerActions()
m_modifyingActions << ActionBuilder(this, CLEAN_WHITESPACE) m_modifyingActions << ActionBuilder(this, CLEAN_WHITESPACE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->cleanWhitespace(); }) .addOnTriggered([this] { q->cleanWhitespace(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_textWrappingAction = ActionBuilder(this, TEXT_WRAPPING) m_textWrappingAction = ActionBuilder(this, TEXT_WRAPPING)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnToggled(this, [this] (bool checked) { .addOnToggled(
this,
[this](bool checked) {
DisplaySettings ds = q->displaySettings(); DisplaySettings ds = q->displaySettings();
ds.m_textWrapping = checked; ds.m_textWrapping = checked;
q->setDisplaySettings(ds); q->setDisplaySettings(ds);
@@ -4078,146 +4118,187 @@ void TextEditorWidgetPrivate::registerActions()
m_unCommentSelectionAction = ActionBuilder(this, UN_COMMENT_SELECTION) m_unCommentSelectionAction = ActionBuilder(this, UN_COMMENT_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->unCommentSelection(); }) .addOnTriggered([this] { q->unCommentSelection(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, CUT_LINE) m_modifyingActions << ActionBuilder(this, CUT_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->cutLine(); }) .addOnTriggered([this] { q->cutLine(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, COPY_LINE) ActionBuilder(this, COPY_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->copyLine(); }); .addOnTriggered([this] { q->copyLine(); })
.setScriptable(true);
m_copyHtmlAction = ActionBuilder(this, COPY_WITH_HTML) m_copyHtmlAction = ActionBuilder(this, COPY_WITH_HTML)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->copyWithHtml(); }) .addOnTriggered([this] { q->copyWithHtml(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, ADD_CURSORS_TO_LINE_ENDS) ActionBuilder(this, ADD_CURSORS_TO_LINE_ENDS)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->addCursorsToLineEnds(); }); .addOnTriggered([this] { q->addCursorsToLineEnds(); })
.setScriptable(true);
ActionBuilder(this, ADD_SELECT_NEXT_FIND_MATCH) ActionBuilder(this, ADD_SELECT_NEXT_FIND_MATCH)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->addSelectionNextFindMatch(); }); .addOnTriggered([this] { q->addSelectionNextFindMatch(); })
.setScriptable(true);
m_modifyingActions << ActionBuilder(this, DUPLICATE_SELECTION) m_modifyingActions << ActionBuilder(this, DUPLICATE_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->duplicateSelection(); }) .addOnTriggered([this] { q->duplicateSelection(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, DUPLICATE_SELECTION_AND_COMMENT) m_modifyingActions << ActionBuilder(this, DUPLICATE_SELECTION_AND_COMMENT)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->duplicateSelectionAndComment(); }) .addOnTriggered([this] { q->duplicateSelectionAndComment(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, UPPERCASE_SELECTION) m_modifyingActions << ActionBuilder(this, UPPERCASE_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->uppercaseSelection(); }) .addOnTriggered([this] { q->uppercaseSelection(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, LOWERCASE_SELECTION) m_modifyingActions << ActionBuilder(this, LOWERCASE_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->lowercaseSelection(); }) .addOnTriggered([this] { q->lowercaseSelection(); })
.setScriptable(true)
.contextAction(); .contextAction();
m_modifyingActions << ActionBuilder(this, SORT_LINES) m_modifyingActions << ActionBuilder(this, SORT_LINES)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->sortLines(); }) .addOnTriggered([this] { q->sortLines(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, FOLD) ActionBuilder(this, FOLD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->foldCurrentBlock(); }); .addOnTriggered([this] { q->foldCurrentBlock(); })
.setScriptable(true);
ActionBuilder(this, UNFOLD) ActionBuilder(this, UNFOLD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->unfoldCurrentBlock(); }); .addOnTriggered([this] { q->unfoldCurrentBlock(); })
.setScriptable(true);
m_unfoldAllAction = ActionBuilder(this, UNFOLD_ALL) m_unfoldAllAction = ActionBuilder(this, UNFOLD_ALL)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->unfoldAll(); }) .addOnTriggered([this] { q->unfoldAll(); })
.setScriptable(true)
.contextAction(); .contextAction();
ActionBuilder(this, INCREASE_FONT_SIZE) ActionBuilder(this, INCREASE_FONT_SIZE).setContext(m_editorContext).addOnTriggered([this] {
.setContext(m_editorContext) q->increaseFontZoom();
.addOnTriggered([this] { q->increaseFontZoom(); }); });
ActionBuilder(this, DECREASE_FONT_SIZE) ActionBuilder(this, DECREASE_FONT_SIZE).setContext(m_editorContext).addOnTriggered([this] {
.setContext(m_editorContext) q->decreaseFontZoom();
.addOnTriggered([this] { q->decreaseFontZoom(); }); });
ActionBuilder(this, RESET_FONT_SIZE) ActionBuilder(this, RESET_FONT_SIZE).setContext(m_editorContext).addOnTriggered([this] {
.setContext(m_editorContext) q->zoomReset();
.addOnTriggered([this] { q->zoomReset(); }); });
ActionBuilder(this, GOTO_BLOCK_START) ActionBuilder(this, GOTO_BLOCK_START)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoBlockStart(); }); .addOnTriggered([this] { q->gotoBlockStart(); })
.setScriptable(true);
ActionBuilder(this, GOTO_BLOCK_END) ActionBuilder(this, GOTO_BLOCK_END)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoBlockEnd(); }); .addOnTriggered([this] { q->gotoBlockEnd(); })
.setScriptable(true);
ActionBuilder(this, SELECT_BLOCK_UP) ActionBuilder(this, SELECT_BLOCK_UP)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->selectBlockUp(); }); .addOnTriggered([this] { q->selectBlockUp(); })
.setScriptable(true);
ActionBuilder(this, SELECT_BLOCK_DOWN) ActionBuilder(this, SELECT_BLOCK_DOWN)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->selectBlockDown(); }); .addOnTriggered([this] { q->selectBlockDown(); })
.setScriptable(true);
ActionBuilder(this, SELECT_WORD_UNDER_CURSOR) ActionBuilder(this, SELECT_WORD_UNDER_CURSOR)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->selectWordUnderCursor(); }); .addOnTriggered([this] { q->selectWordUnderCursor(); })
.setScriptable(true);
ActionBuilder(this, GOTO_DOCUMENT_START) ActionBuilder(this, GOTO_DOCUMENT_START)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoDocumentStart(); }); .addOnTriggered([this] { q->gotoDocumentStart(); })
.setScriptable(true);
ActionBuilder(this, GOTO_DOCUMENT_END) ActionBuilder(this, GOTO_DOCUMENT_END)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoDocumentEnd(); }); .addOnTriggered([this] { q->gotoDocumentEnd(); })
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_START) ActionBuilder(this, GOTO_LINE_START)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoLineStart(); }); .addOnTriggered([this] { q->gotoLineStart(); })
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_END) ActionBuilder(this, GOTO_LINE_END)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoLineEnd(); }); .addOnTriggered([this] { q->gotoLineEnd(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_LINE) ActionBuilder(this, GOTO_NEXT_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextLine(); }); .addOnTriggered([this] { q->gotoNextLine(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_LINE) ActionBuilder(this, GOTO_PREVIOUS_LINE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousLine(); }); .addOnTriggered([this] { q->gotoPreviousLine(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_CHARACTER) ActionBuilder(this, GOTO_PREVIOUS_CHARACTER)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousCharacter(); }); .addOnTriggered([this] { q->gotoPreviousCharacter(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_CHARACTER) ActionBuilder(this, GOTO_NEXT_CHARACTER)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextCharacter(); }); .addOnTriggered([this] { q->gotoNextCharacter(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD) ActionBuilder(this, GOTO_PREVIOUS_WORD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousWord(); }); .addOnTriggered([this] { q->gotoPreviousWord(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD) ActionBuilder(this, GOTO_NEXT_WORD)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextWord(); }); .addOnTriggered([this] { q->gotoNextWord(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE) ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousWordCamelCase(); }); .addOnTriggered([this] { q->gotoPreviousWordCamelCase(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE) ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextWordCamelCase(); }); .addOnTriggered([this] { q->gotoNextWordCamelCase(); })
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_START_WITH_SELECTION) ActionBuilder(this, GOTO_LINE_START_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoLineStartWithSelection(); }); .addOnTriggered([this] { q->gotoLineStartWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_END_WITH_SELECTION) ActionBuilder(this, GOTO_LINE_END_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoLineEndWithSelection(); }); .addOnTriggered([this] { q->gotoLineEndWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_LINE_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_LINE_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextLineWithSelection(); }); .addOnTriggered([this] { q->gotoNextLineWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_LINE_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_LINE_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousLineWithSelection(); }); .addOnTriggered([this] { q->gotoPreviousLineWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_CHARACTER_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_CHARACTER_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousCharacterWithSelection(); }); .addOnTriggered([this] { q->gotoPreviousCharacterWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_CHARACTER_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_CHARACTER_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextCharacterWithSelection(); }); .addOnTriggered([this] { q->gotoNextCharacterWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_WORD_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousWordWithSelection(); }); .addOnTriggered([this] { q->gotoPreviousWordWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_WORD_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextWordWithSelection(); }); .addOnTriggered([this] { q->gotoNextWordWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoPreviousWordCamelCaseWithSelection(); }); .addOnTriggered([this] { q->gotoPreviousWordCamelCaseWithSelection(); })
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE_WITH_SELECTION)
.setContext(m_editorContext) .setContext(m_editorContext)
.addOnTriggered([this] { q->gotoNextWordCamelCaseWithSelection(); }); .addOnTriggered([this] { q->gotoNextWordCamelCaseWithSelection(); })
.setScriptable(true);
// Collect additional modifying actions so we can check for them inside a readonly file // Collect additional modifying actions so we can check for them inside a readonly file
// and disable them // and disable them

View File

@@ -354,354 +354,242 @@ void TextEditorPlugin::createStandardContextMenu()
void TextEditorPlugin::createEditorCommands() void TextEditorPlugin::createEditorCommands()
{ {
using namespace Core::Constants; using namespace Core::Constants;
ActionBuilder(this, UNDO).setText(Tr::tr("&Undo")).setScriptable(true); ActionBuilder(this, DELETE_LINE).setText(Tr::tr("Delete &Line"));
ActionBuilder(this, REDO).setText(Tr::tr("&Redo")).setScriptable(true); ActionBuilder(this, DELETE_END_OF_LINE).setText(Tr::tr("Delete Line from Cursor On"));
ActionBuilder(this, COPY).setScriptable(true); ActionBuilder(this, DELETE_END_OF_WORD).setText(Tr::tr("Delete Word from Cursor On"));
ActionBuilder(this, CUT).setScriptable(true);
ActionBuilder(this, PASTE).setScriptable(true);
ActionBuilder(this, SELECTALL).setScriptable(true);
ActionBuilder(this, GOTO);
ActionBuilder(this, PRINT);
ActionBuilder(this, DELETE_LINE).setText(Tr::tr("Delete &Line")).setScriptable(true);
ActionBuilder(this, DELETE_END_OF_LINE)
.setText(Tr::tr("Delete Line from Cursor On"))
.setScriptable(true);
ActionBuilder(this, DELETE_END_OF_WORD)
.setText(Tr::tr("Delete Word from Cursor On"))
.setScriptable(true);
ActionBuilder(this, DELETE_END_OF_WORD_CAMEL_CASE) ActionBuilder(this, DELETE_END_OF_WORD_CAMEL_CASE)
.setText(Tr::tr("Delete Word Camel Case from Cursor On")) .setText(Tr::tr("Delete Word Camel Case from Cursor On"));
.setScriptable(true);
ActionBuilder(this, DELETE_START_OF_LINE) ActionBuilder(this, DELETE_START_OF_LINE)
.setText(Tr::tr("Delete Line up to Cursor")) .setText(Tr::tr("Delete Line up to Cursor"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Ctrl+Backspace"), {}); .setDefaultKeySequence(Tr::tr("Ctrl+Backspace"), {});
ActionBuilder(this, DELETE_START_OF_WORD) ActionBuilder(this, DELETE_START_OF_WORD).setText(Tr::tr("Delete Word up to Cursor"));
.setText(Tr::tr("Delete Word up to Cursor"))
.setScriptable(true);
ActionBuilder(this, DELETE_START_OF_WORD_CAMEL_CASE) ActionBuilder(this, DELETE_START_OF_WORD_CAMEL_CASE)
.setText(Tr::tr("Delete Word Camel Case up to Cursor")) .setText(Tr::tr("Delete Word Camel Case up to Cursor"));
.setScriptable(true);
ActionBuilder(this, GOTO_BLOCK_START_WITH_SELECTION) ActionBuilder(this, GOTO_BLOCK_START_WITH_SELECTION)
.setText(Tr::tr("Go to Block Start with Selection")) .setText(Tr::tr("Go to Block Start with Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+{"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+{")));
ActionBuilder(this, GOTO_BLOCK_END_WITH_SELECTION) ActionBuilder(this, GOTO_BLOCK_END_WITH_SELECTION)
.setText(Tr::tr("Go to Block End with Selection")) .setText(Tr::tr("Go to Block End with Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+}"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+}")));
ActionBuilder(this, MOVE_LINE_UP) ActionBuilder(this, MOVE_LINE_UP)
.setText(Tr::tr("Move Line Up")) .setText(Tr::tr("Move Line Up"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Up"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Up")));
ActionBuilder(this, MOVE_LINE_DOWN) ActionBuilder(this, MOVE_LINE_DOWN)
.setText(Tr::tr("Move Line Down")) .setText(Tr::tr("Move Line Down"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Down"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Down")));
ActionBuilder(this, COPY_LINE_UP) ActionBuilder(this, COPY_LINE_UP)
.setText(Tr::tr("Copy Line Up")) .setText(Tr::tr("Copy Line Up"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+Up"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+Up")));
ActionBuilder(this, COPY_LINE_DOWN) ActionBuilder(this, COPY_LINE_DOWN)
.setText(Tr::tr("Copy Line Down")) .setText(Tr::tr("Copy Line Down"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+Down"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+Down")));
ActionBuilder(this, JOIN_LINES) ActionBuilder(this, JOIN_LINES)
.setText(Tr::tr("Join Lines")) .setText(Tr::tr("Join Lines"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+J"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+J")));
ActionBuilder(this, INSERT_LINE_ABOVE) ActionBuilder(this, INSERT_LINE_ABOVE)
.setText(Tr::tr("Insert Line Above Current Line")) .setText(Tr::tr("Insert Line Above Current Line"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Return"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Return")));
ActionBuilder(this, INSERT_LINE_BELOW) ActionBuilder(this, INSERT_LINE_BELOW)
.setText(Tr::tr("Insert Line Below Current Line")) .setText(Tr::tr("Insert Line Below Current Line"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Return"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Return")));
ActionBuilder(this, SWITCH_UTF8BOM) ActionBuilder(this, SWITCH_UTF8BOM).setText(Tr::tr("Delete Word up to Cursor"));
.setText(Tr::tr("Delete Word up to Cursor")) ActionBuilder(this, INDENT).setText(Tr::tr("Indent"));
.setScriptable(true); ActionBuilder(this, UNINDENT).setText(Tr::tr("Unindent"));
ActionBuilder(this, INDENT)
.setText(Tr::tr("Indent"))
.setScriptable(true);
ActionBuilder(this, UNINDENT)
.setText(Tr::tr("Unindent"))
.setScriptable(true);
ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR) ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR)
.setText(Tr::tr("Follow Symbol Under Cursor")) .setText(Tr::tr("Follow Symbol Under Cursor"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Qt::Key_F2)); .setDefaultKeySequence(QKeySequence(Qt::Key_F2));
ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT) ActionBuilder(this, FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT)
.setText(Tr::tr("Follow Symbol Under Cursor in Next Split")) .setText(Tr::tr("Follow Symbol Under Cursor in Next Split"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+E, F2"), Tr::tr("Ctrl+E, F2")); .setDefaultKeySequence(Tr::tr("Meta+E, F2"), Tr::tr("Ctrl+E, F2"));
ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE) ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE)
.setText(Tr::tr("Follow Type Under Cursor")) .setText(Tr::tr("Follow Type Under Cursor"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+F2"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+F2")));
ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE_IN_NEXT_SPLIT) ActionBuilder(this, FOLLOW_SYMBOL_TO_TYPE_IN_NEXT_SPLIT)
.setText(Tr::tr("Follow Type Under Cursor in Next Split")) .setText(Tr::tr("Follow Type Under Cursor in Next Split"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+E, Shift+F2"), Tr::tr("Ctrl+E, Ctrl+Shift+F2")); .setDefaultKeySequence(Tr::tr("Meta+E, Shift+F2"), Tr::tr("Ctrl+E, Ctrl+Shift+F2"));
ActionBuilder(this, FIND_USAGES) ActionBuilder(this, FIND_USAGES)
.setText(Tr::tr("Find References to Symbol Under Cursor")) .setText(Tr::tr("Find References to Symbol Under Cursor"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+U"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+U")));
ActionBuilder(this, RENAME_SYMBOL) ActionBuilder(this, RENAME_SYMBOL)
.setText(Tr::tr("Rename Symbol Under Cursor")) .setText(Tr::tr("Rename Symbol Under Cursor"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+R"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+R")));
ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR) ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR)
.setText(Tr::tr("Jump to File Under Cursor")) .setText(Tr::tr("Jump to File Under Cursor"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Qt::Key_F2)); .setDefaultKeySequence(QKeySequence(Qt::Key_F2));
ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT) ActionBuilder(this, JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT)
.setText(Tr::tr("Jump to File Under Cursor in Next Split")) .setText(Tr::tr("Jump to File Under Cursor in Next Split"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+E, F2"), Tr::tr("Ctrl+E, F2")); .setDefaultKeySequence(Tr::tr("Meta+E, F2"), Tr::tr("Ctrl+E, F2"));
ActionBuilder(this, OPEN_CALL_HIERARCHY) ActionBuilder(this, OPEN_CALL_HIERARCHY).setText(Tr::tr("Open Call Hierarchy"));
.setText(Tr::tr("Open Call Hierarchy"))
.setScriptable(true);
ActionBuilder(this, OPEN_TYPE_HIERARCHY) ActionBuilder(this, OPEN_TYPE_HIERARCHY)
.setText(Tr::tr("Open Type Hierarchy")) .setText(Tr::tr("Open Type Hierarchy"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+Shift+T"), Tr::tr("Ctrl+Shift+T")); .setDefaultKeySequence(Tr::tr("Meta+Shift+T"), Tr::tr("Ctrl+Shift+T"));
ActionBuilder(this, VIEW_PAGE_UP) ActionBuilder(this, VIEW_PAGE_UP)
.setText(Tr::tr("Move the View a Page Up and Keep the Cursor Position")) .setText(Tr::tr("Move the View a Page Up and Keep the Cursor Position"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+PgUp"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+PgUp")));
ActionBuilder(this, VIEW_PAGE_DOWN) ActionBuilder(this, VIEW_PAGE_DOWN)
.setText(Tr::tr("Move the View a Page Down and Keep the Cursor Position")) .setText(Tr::tr("Move the View a Page Down and Keep the Cursor Position"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+PgDown"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+PgDown")));
ActionBuilder(this, VIEW_LINE_UP) ActionBuilder(this, VIEW_LINE_UP)
.setText(Tr::tr("Move the View a Line Up and Keep the Cursor Position")) .setText(Tr::tr("Move the View a Line Up and Keep the Cursor Position"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Up"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Up")));
ActionBuilder(this, VIEW_LINE_DOWN) ActionBuilder(this, VIEW_LINE_DOWN)
.setText(Tr::tr("Move the View a Line Down and Keep the Cursor Position")) .setText(Tr::tr("Move the View a Line Down and Keep the Cursor Position"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Down"))); .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Down")));
ActionManager::actionContainer(M_EDIT); ActionManager::actionContainer(M_EDIT);
ActionBuilder(this, SELECT_ENCODING) ActionBuilder(this, SELECT_ENCODING)
.setText(Tr::tr("Select Encoding...")) .setText(Tr::tr("Select Encoding..."))
.setScriptable(false)
.addToContainer(M_EDIT, G_EDIT_OTHER); .addToContainer(M_EDIT, G_EDIT_OTHER);
ActionBuilder(this, CIRCULAR_PASTE) ActionBuilder(this, CIRCULAR_PASTE)
.setText(Tr::tr("Paste from Clipboard History")) .setText(Tr::tr("Paste from Clipboard History"))
.setScriptable(false)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+V"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+V")))
.addToContainer(M_EDIT, G_EDIT_COPYPASTE); .addToContainer(M_EDIT, G_EDIT_COPYPASTE);
ActionBuilder(this, NO_FORMAT_PASTE) ActionBuilder(this, NO_FORMAT_PASTE)
.setText(Tr::tr("Paste Without Formatting")) .setText(Tr::tr("Paste Without Formatting"))
.setScriptable(false)
.setDefaultKeySequence(Tr::tr("Ctrl+Alt+Shift+V"), QString()) .setDefaultKeySequence(Tr::tr("Ctrl+Alt+Shift+V"), QString())
.addToContainer(M_EDIT, G_EDIT_COPYPASTE); .addToContainer(M_EDIT, G_EDIT_COPYPASTE);
ActionManager::actionContainer(M_EDIT_ADVANCED); ActionManager::actionContainer(M_EDIT_ADVANCED);
ActionBuilder(this, AUTO_INDENT_SELECTION) ActionBuilder(this, AUTO_INDENT_SELECTION)
.setText(Tr::tr("Auto-&indent Selection")) .setText(Tr::tr("Auto-&indent Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+I"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+I")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, AUTO_FORMAT_SELECTION) ActionBuilder(this, AUTO_FORMAT_SELECTION)
.setText(Tr::tr("Auto-&format Selection")) .setText(Tr::tr("Auto-&format Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+;"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+;")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, REWRAP_PARAGRAPH) ActionBuilder(this, REWRAP_PARAGRAPH)
.setText(Tr::tr("&Rewrap Paragraph")) .setText(Tr::tr("&Rewrap Paragraph"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+E, R"), Tr::tr("Ctrl+E, R")) .setDefaultKeySequence(Tr::tr("Meta+E, R"), Tr::tr("Ctrl+E, R"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, VISUALIZE_WHITESPACE) ActionBuilder(this, VISUALIZE_WHITESPACE)
.setText(Tr::tr("&Visualize Whitespace")) .setText(Tr::tr("&Visualize Whitespace"))
.setScriptable(false)
.setDefaultKeySequence(Tr::tr("Meta+E, Meta+V"), Tr::tr("Ctrl+E, Ctrl+V")) .setDefaultKeySequence(Tr::tr("Meta+E, Meta+V"), Tr::tr("Ctrl+E, Ctrl+V"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, CLEAN_WHITESPACE) ActionBuilder(this, CLEAN_WHITESPACE)
.setText(Tr::tr("Clean Whitespace")) .setText(Tr::tr("Clean Whitespace"))
.setScriptable(true)
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, TEXT_WRAPPING) ActionBuilder(this, TEXT_WRAPPING)
.setText(Tr::tr("Enable Text &Wrapping")) .setText(Tr::tr("Enable Text &Wrapping"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+E, Meta+W"), Tr::tr("Ctrl+E, Ctrl+W")) .setDefaultKeySequence(Tr::tr("Meta+E, Meta+W"), Tr::tr("Ctrl+E, Ctrl+W"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT) .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT)
.setCheckable(true); .setCheckable(true);
ActionBuilder(this, UN_COMMENT_SELECTION) ActionBuilder(this, UN_COMMENT_SELECTION)
.setText(Tr::tr("Toggle Comment &Selection")) .setText(Tr::tr("Toggle Comment &Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+/"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+/")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);
ActionBuilder(this, CUT_LINE) ActionBuilder(this, CUT_LINE)
.setText(Tr::tr("Cut &Line")) .setText(Tr::tr("Cut &Line"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Shift+Del"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Shift+Del")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, COPY_LINE) ActionBuilder(this, COPY_LINE)
.setText(Tr::tr("Copy &Line")) .setText(Tr::tr("Copy &Line"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Ins"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Ins")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, COPY_WITH_HTML) ActionBuilder(this, COPY_WITH_HTML)
.setText(Tr::tr("Copy With Highlighting")) .setText(Tr::tr("Copy With Highlighting"))
.setScriptable(true)
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, ADD_CURSORS_TO_LINE_ENDS) ActionBuilder(this, ADD_CURSORS_TO_LINE_ENDS)
.setText(Tr::tr("Create Cursors at Selected Line Ends")) .setText(Tr::tr("Create Cursors at Selected Line Ends"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Alt+Shift+I"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Alt+Shift+I")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, ADD_SELECT_NEXT_FIND_MATCH) ActionBuilder(this, ADD_SELECT_NEXT_FIND_MATCH)
.setText(Tr::tr("Add Next Occurrence to Selection")) .setText(Tr::tr("Add Next Occurrence to Selection"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+D"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+D")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, DUPLICATE_SELECTION) ActionBuilder(this, DUPLICATE_SELECTION)
.setText(Tr::tr("&Duplicate Selection")) .setText(Tr::tr("&Duplicate Selection"))
.setScriptable(true)
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, DUPLICATE_SELECTION_AND_COMMENT) ActionBuilder(this, DUPLICATE_SELECTION_AND_COMMENT)
.setText(Tr::tr("&Duplicate Selection and Comment")) .setText(Tr::tr("&Duplicate Selection and Comment"))
.setScriptable(true)
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, UPPERCASE_SELECTION) ActionBuilder(this, UPPERCASE_SELECTION)
.setText(Tr::tr("Uppercase Selection")) .setText(Tr::tr("Uppercase Selection"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+Shift+U"), Tr::tr("Alt+Shift+U")) .setDefaultKeySequence(Tr::tr("Meta+Shift+U"), Tr::tr("Alt+Shift+U"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, LOWERCASE_SELECTION) ActionBuilder(this, LOWERCASE_SELECTION)
.setText(Tr::tr("Lowercase Selection")) .setText(Tr::tr("Lowercase Selection"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+U"), Tr::tr("Alt+U")) .setDefaultKeySequence(Tr::tr("Meta+U"), Tr::tr("Alt+U"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, SORT_LINES) ActionBuilder(this, SORT_LINES)
.setText(Tr::tr("Sort Lines")) .setText(Tr::tr("Sort Lines"))
.setScriptable(true)
.setDefaultKeySequence(Tr::tr("Meta+Shift+S"), Tr::tr("Alt+Shift+S")) .setDefaultKeySequence(Tr::tr("Meta+Shift+S"), Tr::tr("Alt+Shift+S"))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_TEXT);
ActionBuilder(this, FOLD) ActionBuilder(this, FOLD)
.setText(Tr::tr("Fold")) .setText(Tr::tr("Fold"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+<"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+<")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING); .addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING);
ActionBuilder(this, UNFOLD) ActionBuilder(this, UNFOLD)
.setText(Tr::tr("Unfold")) .setText(Tr::tr("Unfold"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+>"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+>")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING); .addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING);
ActionBuilder(this, UNFOLD_ALL) ActionBuilder(this, UNFOLD_ALL)
.setText(Tr::tr("Toggle &Fold All")) .setText(Tr::tr("Toggle &Fold All"))
.setScriptable(true)
.addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING); .addToContainer(M_EDIT_ADVANCED, G_EDIT_COLLAPSING);
ActionBuilder(this, INCREASE_FONT_SIZE) ActionBuilder(this, INCREASE_FONT_SIZE)
.setText(Tr::tr("Increase Font Size")) .setText(Tr::tr("Increase Font Size"))
.setScriptable(false)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl++"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl++")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT);
ActionBuilder(this, DECREASE_FONT_SIZE) ActionBuilder(this, DECREASE_FONT_SIZE)
.setText(Tr::tr("Decrease Font Size")) .setText(Tr::tr("Decrease Font Size"))
.setScriptable(false)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+-"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+-")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT);
ActionBuilder(this, RESET_FONT_SIZE) ActionBuilder(this, RESET_FONT_SIZE)
.setText(Tr::tr("Reset Font Size")) .setText(Tr::tr("Reset Font Size"))
.setScriptable(false)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+0"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+0")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT); .addToContainer(M_EDIT_ADVANCED, G_EDIT_FONT);
ActionBuilder(this, GOTO_BLOCK_START) ActionBuilder(this, GOTO_BLOCK_START)
.setText(Tr::tr("Go to Block Start")) .setText(Tr::tr("Go to Block Start"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+["))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+[")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS); .addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
ActionBuilder(this, GOTO_BLOCK_END) ActionBuilder(this, GOTO_BLOCK_END)
.setText(Tr::tr("Go to Block End")) .setText(Tr::tr("Go to Block End"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+]"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+]")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS); .addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
ActionBuilder(this, SELECT_BLOCK_UP) ActionBuilder(this, SELECT_BLOCK_UP)
.setText(Tr::tr("Select Block Up")) .setText(Tr::tr("Select Block Up"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+U"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+U")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS); .addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
ActionBuilder(this, SELECT_BLOCK_DOWN) ActionBuilder(this, SELECT_BLOCK_DOWN)
.setText(Tr::tr("Select Block Down")) .setText(Tr::tr("Select Block Down"))
.setScriptable(true)
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Alt+U"))) .setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Alt+U")))
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS); .addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
ActionBuilder(this, SELECT_WORD_UNDER_CURSOR) ActionBuilder(this, SELECT_WORD_UNDER_CURSOR).setText(Tr::tr("Select Word Under Cursor"));
.setText(Tr::tr("Select Word Under Cursor"))
.setScriptable(true);
ActionBuilder(this, GOTO_DOCUMENT_START) ActionBuilder(this, GOTO_DOCUMENT_START).setText(Tr::tr("Go to Document Start"));
.setText(Tr::tr("Go to Document Start")) ActionBuilder(this, GOTO_DOCUMENT_END).setText(Tr::tr("Go to Document End"));
.setScriptable(true); ActionBuilder(this, GOTO_LINE_START).setText(Tr::tr("Go to Line Start"));
ActionBuilder(this, GOTO_DOCUMENT_END) ActionBuilder(this, GOTO_LINE_END).setText(Tr::tr("Go to Line End"));
.setText(Tr::tr("Go to Document End")) ActionBuilder(this, GOTO_NEXT_LINE).setText(Tr::tr("Go to Next Line"));
.setScriptable(true); ActionBuilder(this, GOTO_PREVIOUS_LINE).setText(Tr::tr("Go to Previous Line"));
ActionBuilder(this, GOTO_LINE_START) ActionBuilder(this, GOTO_PREVIOUS_CHARACTER).setText(Tr::tr("Go to Previous Character"));
.setText(Tr::tr("Go to Line Start")) ActionBuilder(this, GOTO_NEXT_CHARACTER).setText(Tr::tr("Go to Next Character"));
.setScriptable(true); ActionBuilder(this, GOTO_PREVIOUS_WORD).setText(Tr::tr("Go to Previous Word"));
ActionBuilder(this, GOTO_LINE_END) ActionBuilder(this, GOTO_NEXT_WORD).setText(Tr::tr("Go to Next Word"));
.setText(Tr::tr("Go to Line End"))
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_LINE)
.setText(Tr::tr("Go to Next Line"))
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_LINE)
.setText(Tr::tr("Go to Previous Line"))
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_CHARACTER)
.setText(Tr::tr("Go to Previous Character"))
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_CHARACTER)
.setText(Tr::tr("Go to Next Character"))
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD)
.setText(Tr::tr("Go to Previous Word"))
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD)
.setText(Tr::tr("Go to Next Word"))
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE) ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE)
.setText(Tr::tr("Go to Previous Word (Camel Case)")) .setText(Tr::tr("Go to Previous Word (Camel Case)"));
.setScriptable(true); ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE).setText(Tr::tr("Go to Next Word (Camel Case)"));
ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE)
.setText(Tr::tr("Go to Next Word (Camel Case)"))
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_START_WITH_SELECTION) ActionBuilder(this, GOTO_LINE_START_WITH_SELECTION)
.setText(Tr::tr("Go to Line Start with Selection")) .setText(Tr::tr("Go to Line Start with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_LINE_END_WITH_SELECTION) ActionBuilder(this, GOTO_LINE_END_WITH_SELECTION)
.setText(Tr::tr("Go to Line End with Selection")) .setText(Tr::tr("Go to Line End with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_LINE_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_LINE_WITH_SELECTION)
.setText(Tr::tr("Go to Next Line with Selection")) .setText(Tr::tr("Go to Next Line with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_LINE_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_LINE_WITH_SELECTION)
.setText(Tr::tr("Go to Previous Line with Selection")) .setText(Tr::tr("Go to Previous Line with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_CHARACTER_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_CHARACTER_WITH_SELECTION)
.setText(Tr::tr("Go to Previous Character with Selection")) .setText(Tr::tr("Go to Previous Character with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_CHARACTER_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_CHARACTER_WITH_SELECTION)
.setText(Tr::tr("Go to Next Character with Selection")) .setText(Tr::tr("Go to Next Character with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_WORD_WITH_SELECTION)
.setText(Tr::tr("Go to Previous Word with Selection")) .setText(Tr::tr("Go to Previous Word with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_WORD_WITH_SELECTION)
.setText(Tr::tr("Go to Next Word with Selection")) .setText(Tr::tr("Go to Next Word with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE_WITH_SELECTION) ActionBuilder(this, GOTO_PREVIOUS_WORD_CAMEL_CASE_WITH_SELECTION)
.setText(Tr::tr("Go to Previous Word (Camel Case) with Selection")) .setText(Tr::tr("Go to Previous Word (Camel Case) with Selection"));
.setScriptable(true);
ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE_WITH_SELECTION) ActionBuilder(this, GOTO_NEXT_WORD_CAMEL_CASE_WITH_SELECTION)
.setText(Tr::tr("Go to Next Word (Camel Case) with Selection")) .setText(Tr::tr("Go to Next Word (Camel Case) with Selection"));
.setScriptable(true);
} }
} // namespace TextEditor::Internal } // namespace TextEditor::Internal