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

(user request)
This commit is contained in:
mae
2009-07-22 15:32:52 +02:00
parent 31d62997c7
commit 4b24de2866

View File

@@ -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;
}