forked from qt-creator/qt-creator
CppEditor: Rename CppPlugin to CppEditorPlugin
Change-Id: Icebf85ae425f413ed0d3dfc873869665233ec58c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
e3ecf4232c
commit
a2b2857b44
@@ -28,8 +28,12 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "cppeditor.h"
|
#include "cppeditor.h"
|
||||||
#include "cppplugin.h"
|
|
||||||
|
|
||||||
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
#include <cplusplus/CppDocument.h>
|
||||||
|
#include <cppeditor/cppeditor.h>
|
||||||
|
#include <cppeditor/cppeditorplugin.h>
|
||||||
|
#include <cpptools/cppmodelmanagerinterface.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -136,7 +140,7 @@ void TestCase::run(const QByteArray &expected, int undoCount)
|
|||||||
}
|
}
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_qt_style()
|
void CppEditorPlugin::test_doxygen_comments_qt_style()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -155,7 +159,7 @@ void CppPlugin::test_doxygen_comments_qt_style()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_qt_style_continuation()
|
void CppEditorPlugin::test_doxygen_comments_qt_style_continuation()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -177,7 +181,7 @@ void CppPlugin::test_doxygen_comments_qt_style_continuation()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_java_style()
|
void CppEditorPlugin::test_doxygen_comments_java_style()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -196,7 +200,7 @@ void CppPlugin::test_doxygen_comments_java_style()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_java_style_continuation()
|
void CppEditorPlugin::test_doxygen_comments_java_style_continuation()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -218,7 +222,7 @@ void CppPlugin::test_doxygen_comments_java_style_continuation()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleA()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleA()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -237,7 +241,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleB()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleB()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -256,7 +260,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleB()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleA_continuation()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleA_continuation()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
@@ -279,7 +283,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_continuation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// test cpp style doxygen comment when inside a indented scope
|
/// test cpp style doxygen comment when inside a indented scope
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleA_indented()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleA_indented()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
" bool preventFolding;\n"
|
" bool preventFolding;\n"
|
||||||
@@ -299,7 +303,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// test cpp style doxygen comment continuation when inside a indented scope
|
/// test cpp style doxygen comment continuation when inside a indented scope
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleA_indented_continuation()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleA_indented_continuation()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
" bool preventFolding;\n"
|
" bool preventFolding;\n"
|
||||||
@@ -321,7 +325,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented_continuation()
|
|||||||
data.run(expected);
|
data.run(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_doxygen_comments_cpp_styleA_corner_case()
|
void CppEditorPlugin::test_doxygen_comments_cpp_styleA_corner_case()
|
||||||
{
|
{
|
||||||
const QByteArray given =
|
const QByteArray given =
|
||||||
"bool preventFolding;\n"
|
"bool preventFolding;\n"
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "cppeditor.h"
|
#include "cppeditor.h"
|
||||||
|
|
||||||
#include "cppeditorconstants.h"
|
#include "cppeditorconstants.h"
|
||||||
#include "cppplugin.h"
|
#include "cppeditorplugin.h"
|
||||||
#include "cpphighlighter.h"
|
#include "cpphighlighter.h"
|
||||||
#include "cppautocompleter.h"
|
#include "cppautocompleter.h"
|
||||||
#include "cppquickfixassistant.h"
|
#include "cppquickfixassistant.h"
|
||||||
@@ -659,7 +659,7 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor)
|
|||||||
|
|
||||||
m_outlineModel = new OverviewModel(this);
|
m_outlineModel = new OverviewModel(this);
|
||||||
m_proxyModel = new OverviewProxyModel(m_outlineModel, this);
|
m_proxyModel = new OverviewProxyModel(m_outlineModel, this);
|
||||||
if (CppPlugin::instance()->sortedOutline())
|
if (CppEditorPlugin::instance()->sortedOutline())
|
||||||
m_proxyModel->sort(0, Qt::AscendingOrder);
|
m_proxyModel->sort(0, Qt::AscendingOrder);
|
||||||
else
|
else
|
||||||
m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedOutline()
|
m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedOutline()
|
||||||
@@ -671,7 +671,8 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor)
|
|||||||
m_sortAction = new QAction(tr("Sort Alphabetically"), m_outlineCombo);
|
m_sortAction = new QAction(tr("Sort Alphabetically"), m_outlineCombo);
|
||||||
m_sortAction->setCheckable(true);
|
m_sortAction->setCheckable(true);
|
||||||
m_sortAction->setChecked(sortedOutline());
|
m_sortAction->setChecked(sortedOutline());
|
||||||
connect(m_sortAction, SIGNAL(toggled(bool)), CppPlugin::instance(), SLOT(setSortedOutline(bool)));
|
connect(m_sortAction, SIGNAL(toggled(bool)),
|
||||||
|
CppEditorPlugin::instance(), SLOT(setSortedOutline(bool)));
|
||||||
m_outlineCombo->addAction(m_sortAction);
|
m_outlineCombo->addAction(m_sortAction);
|
||||||
|
|
||||||
m_updateOutlineTimer = new QTimer(this);
|
m_updateOutlineTimer = new QTimer(this);
|
||||||
@@ -1787,7 +1788,7 @@ void CPPEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
|||||||
createAssistInterface(TextEditor::QuickFix, TextEditor::ExplicitlyInvoked);
|
createAssistInterface(TextEditor::QuickFix, TextEditor::ExplicitlyInvoked);
|
||||||
if (interface) {
|
if (interface) {
|
||||||
QScopedPointer<TextEditor::IAssistProcessor> processor(
|
QScopedPointer<TextEditor::IAssistProcessor> processor(
|
||||||
CppPlugin::instance()->quickFixProvider()->createProcessor());
|
CppEditorPlugin::instance()->quickFixProvider()->createProcessor());
|
||||||
QScopedPointer<TextEditor::IAssistProposal> proposal(processor->perform(interface));
|
QScopedPointer<TextEditor::IAssistProposal> proposal(processor->perform(interface));
|
||||||
if (!proposal.isNull()) {
|
if (!proposal.isNull()) {
|
||||||
TextEditor::BasicProposalItemListModel *model =
|
TextEditor::BasicProposalItemListModel *model =
|
||||||
@@ -1911,7 +1912,7 @@ Core::IEditor *CPPEditor::duplicate(QWidget *parent)
|
|||||||
{
|
{
|
||||||
CPPEditorWidget *newEditor = new CPPEditorWidget(parent);
|
CPPEditorWidget *newEditor = new CPPEditorWidget(parent);
|
||||||
newEditor->duplicateFrom(editorWidget());
|
newEditor->duplicateFrom(editorWidget());
|
||||||
CppPlugin::instance()->initializeEditor(newEditor);
|
CppEditorPlugin::instance()->initializeEditor(newEditor);
|
||||||
return newEditor->editor();
|
return newEditor->editor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,39 +1,39 @@
|
|||||||
DEFINES += CPPEDITOR_LIBRARY
|
DEFINES += CPPEDITOR_LIBRARY
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
HEADERS += cppplugin.h \
|
HEADERS += cppeditorplugin.h \
|
||||||
cppeditor.h \
|
cppautocompleter.h \
|
||||||
cpphighlighter.h \
|
cppclasswizard.h \
|
||||||
cpphoverhandler.h \
|
|
||||||
cppfilewizard.h \
|
|
||||||
cppeditorconstants.h \
|
cppeditorconstants.h \
|
||||||
cppeditorenums.h \
|
cppeditorenums.h \
|
||||||
cppeditor_global.h \
|
cppeditor_global.h \
|
||||||
cppclasswizard.h \
|
cppeditor.h \
|
||||||
cppoutline.h \
|
|
||||||
cpptypehierarchy.h \
|
|
||||||
cppelementevaluator.h \
|
cppelementevaluator.h \
|
||||||
cppautocompleter.h \
|
cppfilewizard.h \
|
||||||
cppsnippetprovider.h \
|
cppfunctiondecldeflink.h \
|
||||||
|
cpphighlighter.h \
|
||||||
|
cpphoverhandler.h \
|
||||||
|
cppoutline.h \
|
||||||
cppquickfixassistant.h \
|
cppquickfixassistant.h \
|
||||||
cppquickfix.h \
|
|
||||||
cppquickfixes.h \
|
cppquickfixes.h \
|
||||||
cppfunctiondecldeflink.h
|
cppquickfix.h \
|
||||||
|
cppsnippetprovider.h \
|
||||||
|
cpptypehierarchy.h
|
||||||
|
|
||||||
SOURCES += cppplugin.cpp \
|
SOURCES += cppeditorplugin.cpp \
|
||||||
|
cppautocompleter.cpp \
|
||||||
|
cppclasswizard.cpp \
|
||||||
cppeditor.cpp \
|
cppeditor.cpp \
|
||||||
|
cppelementevaluator.cpp \
|
||||||
|
cppfilewizard.cpp \
|
||||||
|
cppfunctiondecldeflink.cpp \
|
||||||
cpphighlighter.cpp \
|
cpphighlighter.cpp \
|
||||||
cpphoverhandler.cpp \
|
cpphoverhandler.cpp \
|
||||||
cppfilewizard.cpp \
|
|
||||||
cppclasswizard.cpp \
|
|
||||||
cppquickfixes.cpp \
|
|
||||||
cppoutline.cpp \
|
cppoutline.cpp \
|
||||||
cpptypehierarchy.cpp \
|
|
||||||
cppelementevaluator.cpp \
|
|
||||||
cppautocompleter.cpp \
|
|
||||||
cppsnippetprovider.cpp \
|
|
||||||
cppquickfixassistant.cpp \
|
cppquickfixassistant.cpp \
|
||||||
cppquickfix.cpp \
|
cppquickfix.cpp \
|
||||||
cppfunctiondecldeflink.cpp
|
cppquickfixes.cpp \
|
||||||
|
cppsnippetprovider.cpp \
|
||||||
|
cpptypehierarchy.cpp
|
||||||
|
|
||||||
RESOURCES += cppeditor.qrc
|
RESOURCES += cppeditor.qrc
|
||||||
OTHER_FILES += CppEditor.mimetypes.xml
|
OTHER_FILES += CppEditor.mimetypes.xml
|
||||||
|
@@ -23,12 +23,14 @@ QtcPlugin {
|
|||||||
"cppautocompleter.h",
|
"cppautocompleter.h",
|
||||||
"cppclasswizard.cpp",
|
"cppclasswizard.cpp",
|
||||||
"cppclasswizard.h",
|
"cppclasswizard.h",
|
||||||
"cppeditor.cpp",
|
|
||||||
"cppeditor.h",
|
|
||||||
"cppeditor.qrc",
|
|
||||||
"cppeditor_global.h",
|
|
||||||
"cppeditorconstants.h",
|
"cppeditorconstants.h",
|
||||||
|
"cppeditor.cpp",
|
||||||
"cppeditorenums.h",
|
"cppeditorenums.h",
|
||||||
|
"cppeditor_global.h",
|
||||||
|
"cppeditor.h",
|
||||||
|
"cppeditorplugin.cpp",
|
||||||
|
"cppeditorplugin.h",
|
||||||
|
"cppeditor.qrc",
|
||||||
"cppelementevaluator.cpp",
|
"cppelementevaluator.cpp",
|
||||||
"cppelementevaluator.h",
|
"cppelementevaluator.h",
|
||||||
"cppfilewizard.cpp",
|
"cppfilewizard.cpp",
|
||||||
@@ -41,14 +43,12 @@ QtcPlugin {
|
|||||||
"cpphoverhandler.h",
|
"cpphoverhandler.h",
|
||||||
"cppoutline.cpp",
|
"cppoutline.cpp",
|
||||||
"cppoutline.h",
|
"cppoutline.h",
|
||||||
"cppplugin.cpp",
|
|
||||||
"cppplugin.h",
|
|
||||||
"cppquickfix.cpp",
|
|
||||||
"cppquickfix.h",
|
|
||||||
"cppquickfixassistant.cpp",
|
"cppquickfixassistant.cpp",
|
||||||
"cppquickfixassistant.h",
|
"cppquickfixassistant.h",
|
||||||
|
"cppquickfix.cpp",
|
||||||
"cppquickfixes.cpp",
|
"cppquickfixes.cpp",
|
||||||
"cppquickfixes.h",
|
"cppquickfixes.h",
|
||||||
|
"cppquickfix.h",
|
||||||
"cppsnippetprovider.cpp",
|
"cppsnippetprovider.cpp",
|
||||||
"cppsnippetprovider.h",
|
"cppsnippetprovider.h",
|
||||||
"cpptypehierarchy.cpp",
|
"cpptypehierarchy.cpp",
|
||||||
@@ -58,9 +58,9 @@ QtcPlugin {
|
|||||||
Group {
|
Group {
|
||||||
condition: Defaults.testsEnabled(qbs)
|
condition: Defaults.testsEnabled(qbs)
|
||||||
files: [
|
files: [
|
||||||
"cppquickfix_test.cpp",
|
|
||||||
"cppdoxygen_test.cpp",
|
"cppdoxygen_test.cpp",
|
||||||
"fileandtokenactions_test.cpp"
|
"cppquickfix_test.cpp",
|
||||||
|
"fileandtokenactions_test.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
|
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
|
||||||
|
@@ -34,8 +34,8 @@ namespace CppEditor {
|
|||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
const char M_CONTEXT[] = "CppEditor.ContextMenu";
|
const char M_CONTEXT[] = "CppEditor.ContextMenu";
|
||||||
const char C_CPPEDITOR[] = "CppPlugin.C++Editor";
|
const char C_CPPEDITOR[] = "CppEditor.C++Editor";
|
||||||
const char CPPEDITOR_ID[] = "CppPlugin.C++Editor";
|
const char CPPEDITOR_ID[] = "CppEditor.C++Editor";
|
||||||
const char CPPEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
|
const char CPPEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
|
||||||
const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinition";
|
const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinition";
|
||||||
const char OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT[] = "CppEditor.OpenDeclarationDefinitionInNextSplit";
|
const char OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT[] = "CppEditor.OpenDeclarationDefinitionInNextSplit";
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "cppplugin.h"
|
#include "cppeditorplugin.h"
|
||||||
|
|
||||||
#include "cppclasswizard.h"
|
#include "cppclasswizard.h"
|
||||||
#include "cppeditor.h"
|
#include "cppeditor.h"
|
||||||
@@ -65,7 +65,7 @@ enum { QUICKFIX_INTERVAL = 20 };
|
|||||||
|
|
||||||
//////////////////////////// CppEditorFactory /////////////////////////////
|
//////////////////////////// CppEditorFactory /////////////////////////////
|
||||||
|
|
||||||
CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
|
CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
|
||||||
m_owner(owner)
|
m_owner(owner)
|
||||||
{
|
{
|
||||||
m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE)
|
m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE)
|
||||||
@@ -108,11 +108,11 @@ QStringList CppEditorFactory::mimeTypes() const
|
|||||||
return m_mimeTypes;
|
return m_mimeTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////// CppPlugin //////////////////////////////////
|
///////////////////////////////// CppEditorPlugin //////////////////////////////////
|
||||||
|
|
||||||
CppPlugin *CppPlugin::m_instance = 0;
|
CppEditorPlugin *CppEditorPlugin::m_instance = 0;
|
||||||
|
|
||||||
CppPlugin::CppPlugin() :
|
CppEditorPlugin::CppEditorPlugin() :
|
||||||
m_actionHandler(0),
|
m_actionHandler(0),
|
||||||
m_sortedOutline(false),
|
m_sortedOutline(false),
|
||||||
m_renameSymbolUnderCursorAction(0),
|
m_renameSymbolUnderCursorAction(0),
|
||||||
@@ -124,18 +124,18 @@ CppPlugin::CppPlugin() :
|
|||||||
m_instance = this;
|
m_instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CppPlugin::~CppPlugin()
|
CppEditorPlugin::~CppEditorPlugin()
|
||||||
{
|
{
|
||||||
delete m_actionHandler;
|
delete m_actionHandler;
|
||||||
m_instance = 0;
|
m_instance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CppPlugin *CppPlugin::instance()
|
CppEditorPlugin *CppEditorPlugin::instance()
|
||||||
{
|
{
|
||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::initializeEditor(CPPEditorWidget *editor)
|
void CppEditorPlugin::initializeEditor(CPPEditorWidget *editor)
|
||||||
{
|
{
|
||||||
m_actionHandler->setupActions(editor);
|
m_actionHandler->setupActions(editor);
|
||||||
|
|
||||||
@@ -147,23 +147,23 @@ void CppPlugin::initializeEditor(CPPEditorWidget *editor)
|
|||||||
editor, SLOT(setSortedOutline(bool)));
|
editor, SLOT(setSortedOutline(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::setSortedOutline(bool sorted)
|
void CppEditorPlugin::setSortedOutline(bool sorted)
|
||||||
{
|
{
|
||||||
m_sortedOutline = sorted;
|
m_sortedOutline = sorted;
|
||||||
emit outlineSortingChanged(sorted);
|
emit outlineSortingChanged(sorted);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CppPlugin::sortedOutline() const
|
bool CppEditorPlugin::sortedOutline() const
|
||||||
{
|
{
|
||||||
return m_sortedOutline;
|
return m_sortedOutline;
|
||||||
}
|
}
|
||||||
|
|
||||||
CppQuickFixAssistProvider *CppPlugin::quickFixProvider() const
|
CppQuickFixAssistProvider *CppEditorPlugin::quickFixProvider() const
|
||||||
{
|
{
|
||||||
return m_quickFixProvider;
|
return m_quickFixProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
|
bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
|
||||||
{
|
{
|
||||||
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"), errorMessage))
|
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"), errorMessage))
|
||||||
return false;
|
return false;
|
||||||
@@ -301,55 +301,55 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::readSettings()
|
void CppEditorPlugin::readSettings()
|
||||||
{
|
{
|
||||||
m_sortedOutline = Core::ICore::settings()->value(QLatin1String("CppTools/SortedMethodOverview"), false).toBool();
|
m_sortedOutline = Core::ICore::settings()->value(QLatin1String("CppTools/SortedMethodOverview"), false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::writeSettings()
|
void CppEditorPlugin::writeSettings()
|
||||||
{
|
{
|
||||||
Core::ICore::settings()->setValue(QLatin1String("CppTools/SortedMethodOverview"), m_sortedOutline);
|
Core::ICore::settings()->setValue(QLatin1String("CppTools/SortedMethodOverview"), m_sortedOutline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::extensionsInitialized()
|
void CppEditorPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtensionSystem::IPlugin::ShutdownFlag CppPlugin::aboutToShutdown()
|
ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown()
|
||||||
{
|
{
|
||||||
writeSettings();
|
writeSettings();
|
||||||
return SynchronousShutdown;
|
return SynchronousShutdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::switchDeclarationDefinition()
|
void CppEditorPlugin::switchDeclarationDefinition()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
||||||
if (editor)
|
if (editor)
|
||||||
editor->switchDeclarationDefinition(/*inNextSplit*/ false);
|
editor->switchDeclarationDefinition(/*inNextSplit*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::openDeclarationDefinitionInNextSplit()
|
void CppEditorPlugin::openDeclarationDefinitionInNextSplit()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
||||||
if (editor)
|
if (editor)
|
||||||
editor->switchDeclarationDefinition(/*inNextSplit*/ true);
|
editor->switchDeclarationDefinition(/*inNextSplit*/ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::renameSymbolUnderCursor()
|
void CppEditorPlugin::renameSymbolUnderCursor()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
||||||
if (editor)
|
if (editor)
|
||||||
editor->renameSymbolUnderCursor();
|
editor->renameSymbolUnderCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::findUsages()
|
void CppEditorPlugin::findUsages()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
||||||
if (editor)
|
if (editor)
|
||||||
editor->findUsages();
|
editor->findUsages();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::onTaskStarted(const QString &type)
|
void CppEditorPlugin::onTaskStarted(const QString &type)
|
||||||
{
|
{
|
||||||
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
|
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
|
||||||
m_renameSymbolUnderCursorAction->setEnabled(false);
|
m_renameSymbolUnderCursorAction->setEnabled(false);
|
||||||
@@ -359,7 +359,7 @@ void CppPlugin::onTaskStarted(const QString &type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::onAllTasksFinished(const QString &type)
|
void CppEditorPlugin::onAllTasksFinished(const QString &type)
|
||||||
{
|
{
|
||||||
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
|
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
|
||||||
m_renameSymbolUnderCursorAction->setEnabled(true);
|
m_renameSymbolUnderCursorAction->setEnabled(true);
|
||||||
@@ -369,7 +369,7 @@ void CppPlugin::onAllTasksFinished(const QString &type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::currentEditorChanged(Core::IEditor *editor)
|
void CppEditorPlugin::currentEditorChanged(Core::IEditor *editor)
|
||||||
{
|
{
|
||||||
if (! editor)
|
if (! editor)
|
||||||
return;
|
return;
|
||||||
@@ -379,7 +379,7 @@ void CppPlugin::currentEditorChanged(Core::IEditor *editor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::openTypeHierarchy()
|
void CppEditorPlugin::openTypeHierarchy()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
|
||||||
if (editor) {
|
if (editor) {
|
||||||
@@ -389,4 +389,4 @@ void CppPlugin::openTypeHierarchy()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(CppPlugin)
|
Q_EXPORT_PLUGIN(CppEditorPlugin)
|
@@ -27,8 +27,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CPPPLUGIN_H
|
#ifndef CPPEDITORPLUGIN_H
|
||||||
#define CPPPLUGIN_H
|
#define CPPEDITORPLUGIN_H
|
||||||
|
|
||||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||||
|
|
||||||
@@ -50,16 +50,16 @@ class CPPEditorWidget;
|
|||||||
class CppQuickFixCollector;
|
class CppQuickFixCollector;
|
||||||
class CppQuickFixAssistProvider;
|
class CppQuickFixAssistProvider;
|
||||||
|
|
||||||
class CppPlugin : public ExtensionSystem::IPlugin
|
class CppEditorPlugin : public ExtensionSystem::IPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CppEditor.json")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CppEditor.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CppPlugin();
|
CppEditorPlugin();
|
||||||
~CppPlugin();
|
~CppEditorPlugin();
|
||||||
|
|
||||||
static CppPlugin *instance();
|
static CppEditorPlugin *instance();
|
||||||
|
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
|
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
@@ -170,7 +170,7 @@ private:
|
|||||||
void writeSettings();
|
void writeSettings();
|
||||||
void readSettings();
|
void readSettings();
|
||||||
|
|
||||||
static CppPlugin *m_instance;
|
static CppEditorPlugin *m_instance;
|
||||||
|
|
||||||
TextEditor::TextEditorActionHandler *m_actionHandler;
|
TextEditor::TextEditorActionHandler *m_actionHandler;
|
||||||
bool m_sortedOutline;
|
bool m_sortedOutline;
|
||||||
@@ -189,7 +189,7 @@ class CppEditorFactory : public Core::IEditorFactory
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CppEditorFactory(CppPlugin *owner);
|
CppEditorFactory(CppEditorPlugin *owner);
|
||||||
|
|
||||||
// IEditorFactory
|
// IEditorFactory
|
||||||
QStringList mimeTypes() const;
|
QStringList mimeTypes() const;
|
||||||
@@ -198,11 +198,11 @@ public:
|
|||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CppPlugin *m_owner;
|
CppEditorPlugin *m_owner;
|
||||||
QStringList m_mimeTypes;
|
QStringList m_mimeTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CppEditor
|
} // namespace CppEditor
|
||||||
|
|
||||||
#endif // CPPPLUGIN_H
|
#endif // CPPEDITORPLUGIN_H
|
@@ -28,7 +28,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "cppeditor.h"
|
#include "cppeditor.h"
|
||||||
#include "cppplugin.h"
|
#include "cppeditorplugin.h"
|
||||||
#include "cppquickfixassistant.h"
|
#include "cppquickfixassistant.h"
|
||||||
#include "cppquickfixes.h"
|
#include "cppquickfixes.h"
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ void TestCase::run(CppQuickFixFactory *factory, int resultIndex)
|
|||||||
/// 1. If the name does not start with ("m_" or "_") and does not
|
/// 1. If the name does not start with ("m_" or "_") and does not
|
||||||
/// end with "_", we are forced to prefix the getter with "get".
|
/// end with "_", we are forced to prefix the getter with "get".
|
||||||
/// 2. Setter: Use pass by value on integer/float and pointer types.
|
/// 2. Setter: Use pass by value on integer/float and pointer types.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefix()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefix()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -353,7 +353,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefix()
|
|||||||
/// Checks:
|
/// Checks:
|
||||||
/// 1. Getter: "get" prefix is not necessary.
|
/// 1. Getter: "get" prefix is not necessary.
|
||||||
/// 2. Setter: Parameter name is base name.
|
/// 2. Setter: Parameter name is base name.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithoutPrefix()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithoutPrefix()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -392,7 +392,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithoutPrefix()
|
|||||||
|
|
||||||
/// Check: Setter: Use pass by reference for parameters which
|
/// Check: Setter: Use pass by reference for parameters which
|
||||||
/// are not integer, float or pointers.
|
/// are not integer, float or pointers.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_customType()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_customType()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -432,7 +432,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_customType()
|
|||||||
/// Checks:
|
/// Checks:
|
||||||
/// 1. Setter: No setter is generated for const members.
|
/// 1. Setter: No setter is generated for const members.
|
||||||
/// 2. Getter: Return a non-const type since it pass by value anyway.
|
/// 2. Getter: Return a non-const type since it pass by value anyway.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_constMember()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_constMember()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -464,7 +464,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_constMember()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Checks: No special treatment for pointer to non const.
|
/// Checks: No special treatment for pointer to non const.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_pointerToNonConst()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_pointerToNonConst()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -502,7 +502,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_pointerToNonConst()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Checks: No special treatment for pointer to const.
|
/// Checks: No special treatment for pointer to const.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_pointerToConst()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_pointerToConst()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -542,7 +542,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_pointerToConst()
|
|||||||
/// Checks:
|
/// Checks:
|
||||||
/// 1. Setter: Setter is a static function.
|
/// 1. Setter: Setter is a static function.
|
||||||
/// 2. Getter: Getter is a static, non const function.
|
/// 2. Getter: Getter is a static, non const function.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_staticMember()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_staticMember()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -580,7 +580,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_staticMember()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Check if it works on the second declarator
|
/// Check: Check if it works on the second declarator
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_secondDeclarator()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_secondDeclarator()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -618,7 +618,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_secondDeclarator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Quick fix is offered for "int *@it;" ('@' denotes the text cursor position)
|
/// Check: Quick fix is offered for "int *@it;" ('@' denotes the text cursor position)
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_triggeringRightAfterPointerSign()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_triggeringRightAfterPointerSign()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"\n"
|
"\n"
|
||||||
@@ -656,7 +656,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_triggeringRightAfterPointerSi
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Quick fix is not triggered on a member function.
|
/// Check: Quick fix is not triggered on a member function.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberFunction()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberFunction()
|
||||||
{
|
{
|
||||||
const QByteArray original = "class Something { void @f(); };";
|
const QByteArray original = "class Something { void @f(); };";
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Quick fix is not triggered on an member array;
|
/// Check: Quick fix is not triggered on an member array;
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberArray()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberArray()
|
||||||
{
|
{
|
||||||
const QByteArray original = "class Something { void @a[10]; };";
|
const QByteArray original = "class Something { void @a[10]; };";
|
||||||
|
|
||||||
@@ -677,7 +677,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringOnMemberArray()
|
|||||||
|
|
||||||
/// Check: Do not offer the quick fix if there is already a member with the
|
/// Check: Do not offer the quick fix if there is already a member with the
|
||||||
/// getter or setter name we would generate.
|
/// getter or setter name we would generate.
|
||||||
void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringWhenGetterOrSetterExist()
|
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_notTriggeringWhenGetterOrSetterExist()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"class Something {\n"
|
"class Something {\n"
|
||||||
@@ -692,7 +692,7 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringWhenGetterOrSett
|
|||||||
|
|
||||||
/// Check: Just a basic test since the main functionality is tested in
|
/// Check: Just a basic test since the main functionality is tested in
|
||||||
/// cpppointerdeclarationformatter_test.cpp
|
/// cpppointerdeclarationformatter_test.cpp
|
||||||
void CppPlugin::test_quickfix_ReformatPointerDeclaration()
|
void CppEditorPlugin::test_quickfix_ReformatPointerDeclaration()
|
||||||
{
|
{
|
||||||
const QByteArray original = "char@*s;";
|
const QByteArray original = "char@*s;";
|
||||||
const QByteArray expected = "char *s;\n";
|
const QByteArray expected = "char *s;\n";
|
||||||
@@ -703,7 +703,7 @@ void CppPlugin::test_quickfix_ReformatPointerDeclaration()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check from source file: If there is no header file, insert the definition after the class.
|
/// Check from source file: If there is no header file, insert the definition after the class.
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_basic()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_basic()
|
||||||
{
|
{
|
||||||
const QByteArray original =
|
const QByteArray original =
|
||||||
"struct Foo\n"
|
"struct Foo\n"
|
||||||
@@ -726,7 +726,7 @@ void CppPlugin::test_quickfix_InsertDefFromDecl_basic()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check from header file: If there is a source file, insert the definition in the source file.
|
/// Check from header file: If there is a source file, insert the definition in the source file.
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -759,7 +759,7 @@ void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check from source file: Insert in source file, not header file.
|
/// Check from source file: Insert in source file, not header file.
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -792,7 +792,7 @@ void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
|
|||||||
|
|
||||||
/// Check from header file: If the class is in a namespace, the added function definition
|
/// Check from header file: If the class is in a namespace, the added function definition
|
||||||
/// name must be qualified accordingly.
|
/// name must be qualified accordingly.
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -828,7 +828,7 @@ void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
|
|||||||
|
|
||||||
/// Check from header file: If the class is in namespace N and the source file has a
|
/// Check from header file: If the class is in namespace N and the source file has a
|
||||||
/// "using namespace N" line, the function definition name must be qualified accordingly.
|
/// "using namespace N" line, the function definition name must be qualified accordingly.
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -866,7 +866,7 @@ void CppPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
|
|||||||
data.run(&factory);
|
data.run(&factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_quickfix_InsertDefFromDecl_freeFunction()
|
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_freeFunction()
|
||||||
{
|
{
|
||||||
const QByteArray original = "void free()@;\n";
|
const QByteArray original = "void free()@;\n";
|
||||||
const QByteArray expected = original +
|
const QByteArray expected = original +
|
||||||
@@ -922,7 +922,7 @@ void insertToSectionDeclFromDef(const QByteArray §ion, int sectionIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check from source file: Insert in header file.
|
/// Check from source file: Insert in header file.
|
||||||
void CppPlugin::test_quickfix_InsertDeclFromDef()
|
void CppEditorPlugin::test_quickfix_InsertDeclFromDef()
|
||||||
{
|
{
|
||||||
insertToSectionDeclFromDef("public", 0);
|
insertToSectionDeclFromDef("public", 0);
|
||||||
insertToSectionDeclFromDef("public slots", 1);
|
insertToSectionDeclFromDef("public slots", 1);
|
||||||
@@ -933,7 +933,7 @@ void CppPlugin::test_quickfix_InsertDeclFromDef()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check normal add include if there is already a include
|
/// Check normal add include if there is already a include
|
||||||
void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_normal()
|
void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_normal()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -972,7 +972,7 @@ void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_normal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check add include if no include is present
|
/// Check add include if no include is present
|
||||||
void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noinclude()
|
void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noinclude()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -1008,7 +1008,7 @@ void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noinclude()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check add include if no include is present with comment on top
|
/// Check add include if no include is present with comment on top
|
||||||
void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment01()
|
void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment01()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -1049,7 +1049,7 @@ void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment0
|
|||||||
data.run(&factory);
|
data.run(&factory);
|
||||||
}
|
}
|
||||||
/// Check add include if no include is present with comment on top
|
/// Check add include if no include is present with comment on top
|
||||||
void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment02()
|
void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment02()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
|
|
||||||
@@ -1095,7 +1095,7 @@ void CppPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_noincludeComment0
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move definition from header to cpp.
|
/// Check: Move definition from header to cpp.
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1138,7 +1138,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move definition outside class
|
/// Check: Move definition outside class
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside()
|
||||||
{
|
{
|
||||||
QByteArray original =
|
QByteArray original =
|
||||||
"class Foo {\n"
|
"class Foo {\n"
|
||||||
@@ -1162,7 +1162,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move definition from header to cpp (with namespace).
|
/// Check: Move definition from header to cpp (with namespace).
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1205,7 +1205,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move definition from header to cpp (with namespace + using).
|
/// Check: Move definition from header to cpp (with namespace + using).
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1250,7 +1250,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move definition outside class with Namespace
|
/// Check: Move definition outside class with Namespace
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs()
|
||||||
{
|
{
|
||||||
QByteArray original =
|
QByteArray original =
|
||||||
"namespace MyNs {\n"
|
"namespace MyNs {\n"
|
||||||
@@ -1276,7 +1276,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move free function from header to cpp.
|
/// Check: Move free function from header to cpp.
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCpp()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCpp()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1312,7 +1312,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCpp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move free function from header to cpp (with namespace).
|
/// Check: Move free function from header to cpp (with namespace).
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1352,7 +1352,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: Move Ctor with member initialization list (QTCREATORBUG-9157).
|
/// Check: Move Ctor with member initialization list (QTCREATORBUG-9157).
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1392,7 +1392,7 @@ void CppPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1419,7 +1419,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncOutside()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncOutside()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutside()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutside()
|
||||||
{
|
{
|
||||||
QByteArray original =
|
QByteArray original =
|
||||||
"class Foo {\n"
|
"class Foo {\n"
|
||||||
@@ -1444,7 +1444,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutside()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNS()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNS()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1483,7 +1483,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNSUsing()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNSUsing()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1526,7 +1526,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNSUsing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutsideWithNs()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutsideWithNs()
|
||||||
{
|
{
|
||||||
QByteArray original =
|
QByteArray original =
|
||||||
"namespace MyNs {\n"
|
"namespace MyNs {\n"
|
||||||
@@ -1552,7 +1552,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutsideWithNs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_FreeFuncToCpp()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_FreeFuncToCpp()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCpp()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCpp()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1583,7 +1583,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCpp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCppNS()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCppNS()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
@@ -1620,7 +1620,7 @@ void CppPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCppNS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check: revert test_quickfix_MoveFuncDefOutside_CtorWithInitialization()
|
/// Check: revert test_quickfix_MoveFuncDefOutside_CtorWithInitialization()
|
||||||
void CppPlugin::test_quickfix_MoveFuncDefToDecl_CtorWithInitialization()
|
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_CtorWithInitialization()
|
||||||
{
|
{
|
||||||
QList<TestDocumentPtr> testFiles;
|
QList<TestDocumentPtr> testFiles;
|
||||||
QByteArray original;
|
QByteArray original;
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include "cppeditorconstants.h"
|
#include "cppeditorconstants.h"
|
||||||
#include "cppeditor.h"
|
#include "cppeditor.h"
|
||||||
#include "cppelementevaluator.h"
|
#include "cppelementevaluator.h"
|
||||||
#include "cppplugin.h"
|
#include "cppeditorplugin.h"
|
||||||
|
|
||||||
#include <utils/navigationtreeview.h>
|
#include <utils/navigationtreeview.h>
|
||||||
#include <utils/annotateditemdelegate.h>
|
#include <utils/annotateditemdelegate.h>
|
||||||
@@ -144,7 +144,7 @@ CppTypeHierarchyWidget::CppTypeHierarchyWidget(Core::IEditor *editor) :
|
|||||||
layout->addWidget(m_treeView);
|
layout->addWidget(m_treeView);
|
||||||
|
|
||||||
connect(m_treeView, SIGNAL(clicked(QModelIndex)), this, SLOT(onItemClicked(QModelIndex)));
|
connect(m_treeView, SIGNAL(clicked(QModelIndex)), this, SLOT(onItemClicked(QModelIndex)));
|
||||||
connect(CppPlugin::instance(), SIGNAL(typeHierarchyRequested()), this, SLOT(perform()));
|
connect(CppEditorPlugin::instance(), SIGNAL(typeHierarchyRequested()), this, SLOT(perform()));
|
||||||
} else {
|
} else {
|
||||||
QLabel *label = new QLabel(tr("No type hierarchy available"), this);
|
QLabel *label = new QLabel(tr("No type hierarchy available"), this);
|
||||||
label->setAlignment(Qt::AlignCenter);
|
label->setAlignment(Qt::AlignCenter);
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <cppeditor/cppeditor.h>
|
#include <cppeditor/cppeditor.h>
|
||||||
#include <cppeditor/cppplugin.h>
|
#include <cppeditor/cppeditorplugin.h>
|
||||||
#include <cppeditor/cppquickfixassistant.h>
|
#include <cppeditor/cppquickfixassistant.h>
|
||||||
#include <cppeditor/cppquickfix.h>
|
#include <cppeditor/cppquickfix.h>
|
||||||
#include <cpptools/cpptoolsplugin.h>
|
#include <cpptools/cpptoolsplugin.h>
|
||||||
@@ -367,7 +367,7 @@ void SwitchDeclarationDefinitionTokenAction::run(CPPEditorWidget *)
|
|||||||
IEditor *editorBefore = em->currentEditor();
|
IEditor *editorBefore = em->currentEditor();
|
||||||
const int originalLine = editorBefore->currentLine();
|
const int originalLine = editorBefore->currentLine();
|
||||||
const int originalColumn = editorBefore->currentColumn();
|
const int originalColumn = editorBefore->currentColumn();
|
||||||
CppEditor::Internal::CppPlugin::instance()->switchDeclarationDefinition();
|
CppEditor::Internal::CppEditorPlugin::instance()->switchDeclarationDefinition();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
|
|
||||||
// Go back
|
// Go back
|
||||||
@@ -388,7 +388,7 @@ public:
|
|||||||
|
|
||||||
void FindUsagesTokenAction::run(CPPEditorWidget *)
|
void FindUsagesTokenAction::run(CPPEditorWidget *)
|
||||||
{
|
{
|
||||||
CppEditor::Internal::CppPlugin::instance()->findUsages();
|
CppEditor::Internal::CppEditorPlugin::instance()->findUsages();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ public:
|
|||||||
|
|
||||||
void RenameSymbolUnderCursorTokenAction::run(CPPEditorWidget *)
|
void RenameSymbolUnderCursorTokenAction::run(CPPEditorWidget *)
|
||||||
{
|
{
|
||||||
CppEditor::Internal::CppPlugin::instance()->renameSymbolUnderCursor();
|
CppEditor::Internal::CppEditorPlugin::instance()->renameSymbolUnderCursor();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ public:
|
|||||||
|
|
||||||
void OpenTypeHierarchyTokenAction::run(CPPEditorWidget *)
|
void OpenTypeHierarchyTokenAction::run(CPPEditorWidget *)
|
||||||
{
|
{
|
||||||
CppEditor::Internal::CppPlugin::instance()->openTypeHierarchy();
|
CppEditor::Internal::CppEditorPlugin::instance()->openTypeHierarchy();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,13 +504,13 @@ void SwitchHeaderSourceFileAction::run(CPPEditorWidget *)
|
|||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
void CppPlugin::test_openEachFile()
|
void CppEditorPlugin::test_openEachFile()
|
||||||
{
|
{
|
||||||
TestActionsTestCase test;
|
TestActionsTestCase test;
|
||||||
test.run();
|
test.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_switchHeaderSourceOnEachFile()
|
void CppEditorPlugin::test_switchHeaderSourceOnEachFile()
|
||||||
{
|
{
|
||||||
Actions fileActions;
|
Actions fileActions;
|
||||||
fileActions << ActionPointer(new SwitchHeaderSourceFileAction);
|
fileActions << ActionPointer(new SwitchHeaderSourceFileAction);
|
||||||
@@ -519,7 +519,7 @@ void CppPlugin::test_switchHeaderSourceOnEachFile()
|
|||||||
test.run(Actions(), fileActions);
|
test.run(Actions(), fileActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFile()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFile()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new NoOpTokenAction());
|
tokenActions << ActionPointer(new NoOpTokenAction());
|
||||||
@@ -529,7 +529,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// May block if file does not exists (e.g. a not generated ui_* file).
|
/// May block if file does not exists (e.g. a not generated ui_* file).
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndFollowSymbol()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndFollowSymbol()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new FollowSymbolUnderCursorTokenAction());
|
tokenActions << ActionPointer(new FollowSymbolUnderCursorTokenAction());
|
||||||
@@ -538,7 +538,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndFollowSymbol()
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndSwitchDeclarationDefinition()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndSwitchDeclarationDefinition()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new SwitchDeclarationDefinitionTokenAction());
|
tokenActions << ActionPointer(new SwitchDeclarationDefinitionTokenAction());
|
||||||
@@ -547,7 +547,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndSwitchDeclarationDefinition
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndFindUsages()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndFindUsages()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new FindUsagesTokenAction());
|
tokenActions << ActionPointer(new FindUsagesTokenAction());
|
||||||
@@ -556,7 +556,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndFindUsages()
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndRenameUsages()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndRenameUsages()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new RenameSymbolUnderCursorTokenAction());
|
tokenActions << ActionPointer(new RenameSymbolUnderCursorTokenAction());
|
||||||
@@ -565,7 +565,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndRenameUsages()
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndOpenTypeHierarchy()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndOpenTypeHierarchy()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new OpenTypeHierarchyTokenAction());
|
tokenActions << ActionPointer(new OpenTypeHierarchyTokenAction());
|
||||||
@@ -574,7 +574,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndOpenTypeHierarchy()
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndInvokeCompletion()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndInvokeCompletion()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new InvokeCompletionTokenAction());
|
tokenActions << ActionPointer(new InvokeCompletionTokenAction());
|
||||||
@@ -583,7 +583,7 @@ void CppPlugin::test_moveTokenWiseThroughEveryFileAndInvokeCompletion()
|
|||||||
test.run(tokenActions);
|
test.run(tokenActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPlugin::test_moveTokenWiseThroughEveryFileAndTriggerQuickFixes()
|
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndTriggerQuickFixes()
|
||||||
{
|
{
|
||||||
Actions tokenActions;
|
Actions tokenActions;
|
||||||
tokenActions << ActionPointer(new RunAllQuickFixesTokenAction());
|
tokenActions << ActionPointer(new RunAllQuickFixesTokenAction());
|
||||||
|
Reference in New Issue
Block a user