Skip to content
Snippets Groups Projects
Commit 4b24de28 authored by mae's avatar mae
Browse files

extend cpp editor's context menu with auto-indent and un-comment-selection

(user request)
parent 31d62997
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorplugin.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/texteditorconstants.h>
#include <cpptools/cpptoolsconstants.h>
#include <QtCore/QFileInfo>
......@@ -216,6 +217,15 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
m_actionHandler->initializeActions();
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
am->actionContainer(CppEditor::Constants::M_CONTEXT)->addAction(cmd);
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
am->actionContainer(CppEditor::Constants::M_CONTEXT)->addAction(cmd);
readSettings();
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment