Implement (un)commenting selection of .pro files

Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Task-number: QTCREATORBUG-119
This commit is contained in:
Jarek Kobus
2010-05-25 16:16:04 +02:00
parent 5a6de0ad5e
commit f09d74271c
4 changed files with 47 additions and 1 deletions

View File

@@ -66,6 +66,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorconstants.h>
#ifdef WITH_TESTS
# include <QTest>
@@ -117,7 +118,8 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
addObject(m_qt4ProjectManager);
TextEditor::TextEditorActionHandler *editorHandler
= new TextEditor::TextEditorActionHandler(Constants::C_PROFILEEDITOR);
= new TextEditor::TextEditorActionHandler(Constants::C_PROFILEEDITOR,
TextEditor::TextEditorActionHandler::UnCommentSelection);
m_proFileEditorFactory = new ProFileEditorFactory(m_qt4ProjectManager, editorHandler);
addObject(m_proFileEditorFactory);
@@ -222,6 +224,13 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
connect(m_projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project *)),
this, SLOT(currentProjectChanged()));
Core::ActionContainer *contextMenu= am->createMenu(Qt4ProjectManager::Constants::M_CONTEXT);
Core::Command *cmd;
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
contextMenu->addAction(cmd);
return true;
}