forked from qt-creator/qt-creator
		
	extend cpp editor's context menu with auto-indent and un-comment-selection
(user request)
This commit is contained in:
		| @@ -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; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user