Commit 4b24de28 authored by mae's avatar mae

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

(user request)
parent 31d62997
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment