summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/classview/classviewmanager.cpp6
-rw-r--r--src/plugins/classview/classviewparser.cpp4
-rw-r--r--src/plugins/classview/classviewparser.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp16
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h4
-rw-r--r--src/plugins/cppeditor/cppclasswizard.cpp2
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp12
-rw-r--r--src/plugins/cppeditor/cppeditor.h5
-rw-r--r--src/plugins/cppeditor/cppelementevaluator.cpp4
-rw-r--r--src/plugins/cppeditor/cppelementevaluator.h2
-rw-r--r--src/plugins/cppeditor/cppfilewizard.cpp2
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp2
-rw-r--r--src/plugins/cppeditor/cppplugin.cpp4
-rw-r--r--src/plugins/cppeditor/cppquickfixcollector.cpp6
-rw-r--r--src/plugins/cpptools/abstracteditorsupport.cpp4
-rw-r--r--src/plugins/cpptools/abstracteditorsupport.h67
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp20
-rw-r--r--src/plugins/cpptools/cppfindreferences.h8
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp11
-rw-r--r--src/plugins/cpptools/cppmodelmanager.h12
-rw-r--r--src/plugins/cpptools/cppmodelmanagerinterface.h185
-rw-r--r--src/plugins/cpptools/cpprefactoringchanges.cpp3
-rw-r--r--src/plugins/cpptools/cpprefactoringchanges.h6
-rw-r--r--src/plugins/cpptools/cpptools.pro4
-rw-r--r--src/plugins/cpptools/uicodecompletionsupport.cpp5
-rw-r--r--src/plugins/cpptools/uicodecompletionsupport.h8
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp5
-rw-r--r--src/plugins/debugger/watchutils.cpp10
-rw-r--r--src/plugins/designer/codemodelhelpers.cpp4
-rw-r--r--src/plugins/designer/cpp/formclasswizardparameters.cpp2
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp12
-rw-r--r--src/plugins/designer/qtcreatorintegration.h2
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp8
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp14
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qtuicodemodelsupport.h6
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizard.cpp2
43 files changed, 197 insertions, 294 deletions
diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp
index 9c5e96ce24..e84f5e40c6 100644
--- a/src/plugins/classview/classviewmanager.cpp
+++ b/src/plugins/classview/classviewmanager.cpp
@@ -41,7 +41,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/basetexteditor.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/cpptoolsconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
@@ -86,7 +86,7 @@ struct ManagerPrivate
QThread parserThread;
//! cpp code model manager
- QPointer<CppTools::CppModelManagerInterface> codeModelManager;
+ QPointer<CPlusPlus::CppModelManagerInterface> codeModelManager;
//! there is some massive operation ongoing so temporary we should wait
bool disableCodeParser;
@@ -167,7 +167,7 @@ void Manager::initialize()
SLOT(onAllTasksFinished(QString)), Qt::QueuedConnection);
// connect to the cpp model manager for signals about document updates
- d_ptr->codeModelManager = CppTools::CppModelManagerInterface::instance();
+ d_ptr->codeModelManager = CPlusPlus::CppModelManagerInterface::instance();
// when code manager signals that document is updated - handle it by ourselves
connect(d_ptr->codeModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp
index ce48dee7fe..ff9da4b9b8 100644
--- a/src/plugins/classview/classviewparser.cpp
+++ b/src/plugins/classview/classviewparser.cpp
@@ -42,9 +42,9 @@
#include <Name.h>
// other
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/Overview.h>
#include <cplusplus/Icons.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <projectexplorer/project.h>
@@ -570,7 +570,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot)
void Parser::resetDataToCurrentState()
{
// get latest data
- CppTools::CppModelManagerInterface *codeModel = CppTools::CppModelManagerInterface::instance();
+ CPlusPlus::CppModelManagerInterface *codeModel = CPlusPlus::CppModelManagerInterface::instance();
if (codeModel)
resetData(codeModel->snapshot());
}
diff --git a/src/plugins/classview/classviewparser.h b/src/plugins/classview/classviewparser.h
index 53dab174f8..44d1d7565c 100644
--- a/src/plugins/classview/classviewparser.h
+++ b/src/plugins/classview/classviewparser.h
@@ -44,8 +44,8 @@
#include <QtCore/QSharedPointer>
#include <CPlusPlusForwardDeclarations.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
-#include <cpptools/cppmodelmanagerinterface.h>
// might be changed to forward declaration - is not done to be less dependent
#include <projectexplorer/projectnodes.h>
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 3b3d947cf1..78d0d8b01f 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -47,7 +47,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/toolchain.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <designer/formwindoweditor.h>
#include <utils/qtcassert.h>
@@ -95,8 +95,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
CMakeProject::~CMakeProject()
{
// Remove CodeModel support
- CppTools::CppModelManagerInterface *modelManager
- = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager
+ = ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
it = m_uiCodeModelSupport.constBegin();
end = m_uiCodeModelSupport.constEnd();
@@ -282,10 +282,10 @@ bool CMakeProject::parseCMakeLists()
allIncludePaths.append(projectDirectory());
allIncludePaths.append(cbpparser.includeFiles());
- CppTools::CppModelManagerInterface *modelmanager =
- ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelmanager =
+ ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
if (modelmanager) {
- CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
+ CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
if (pinfo.includePaths != allIncludePaths
|| pinfo.sourceFiles != m_files
|| pinfo.defines != activeBC->toolChain()->predefinedMacros()
@@ -608,8 +608,8 @@ QString CMakeProject::uiHeaderFile(const QString &uiFile)
void CMakeProject::createUiCodeModelSupport()
{
// qDebug()<<"creatUiCodeModelSupport()";
- CppTools::CppModelManagerInterface *modelManager
- = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager
+ = ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
// First move all to
QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport;
diff --git a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp
index 2eea57399c..bd756fc8b8 100644
--- a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp
@@ -36,12 +36,14 @@
#include "cmaketarget.h"
#include "cmakebuildconfiguration.h"
+#include <cplusplus/ModelManagerInterface.h>
+
#include <QtCore/QProcess>
using namespace CMakeProjectManager;
using namespace Internal;
-CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
CMakeProject *project,
const QString &source,
const QString &uiHeaderFile)
diff --git a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h
index 1ade6550af..c06402c9b3 100644
--- a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h
+++ b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h
@@ -34,7 +34,7 @@
#ifndef CMAKEUICODEMODELSUPPORT_H
#define CMAKEUICODEMODELSUPPORT_H
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/uicodecompletionsupport.h>
#include <QtCore/QDateTime>
@@ -47,7 +47,7 @@ class CMakeProject;
class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
{
public:
- CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+ CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
CMakeProject *project,
const QString &sourceFile,
const QString &uiHeaderFile);
diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp
index 9b27e8f3e4..5fc5fa977e 100644
--- a/src/plugins/cppeditor/cppclasswizard.cpp
+++ b/src/plugins/cppeditor/cppclasswizard.cpp
@@ -35,7 +35,7 @@
#include "cppeditorconstants.h"
#include <cpptools/cpptoolsconstants.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index b52a566ac9..e2aab2c863 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -54,6 +54,7 @@
#include <SymbolVisitor.h>
#include <TranslationUnit.h>
#include <cplusplus/ASTPath.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/TypeOfExpression.h>
#include <cplusplus/Overview.h>
@@ -64,7 +65,6 @@
#include <cplusplus/FastPreprocessor.h>
#include <cpptools/cpptoolsplugin.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppcodeformatter.h>
@@ -426,7 +426,7 @@ CPPEditor::CPPEditor(QWidget *parent)
baseTextDocument()->setSyntaxHighlighter(new CppHighlighter);
- m_modelManager = CppTools::CppModelManagerInterface::instance();
+ m_modelManager = CppModelManagerInterface::instance();
if (m_modelManager) {
connect(m_modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
@@ -558,7 +558,7 @@ void CPPEditor::cut()
finishRename();
}
-CppTools::CppModelManagerInterface *CPPEditor::modelManager() const
+CppModelManagerInterface *CPPEditor::modelManager() const
{
return m_modelManager;
}
@@ -666,7 +666,7 @@ const Macro *CPPEditor::findCanonicalMacro(const QTextCursor &cursor, Document::
void CPPEditor::findUsages()
{
SemanticInfo info = m_lastSemanticInfo;
- info.snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
+ info.snapshot = CppModelManagerInterface::instance()->snapshot();
info.snapshot.insert(info.doc);
CanonicalSymbol cs(this, info);
@@ -682,7 +682,7 @@ void CPPEditor::findUsages()
void CPPEditor::renameUsagesNow(const QString &replacement)
{
SemanticInfo info = m_lastSemanticInfo;
- info.snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
+ info.snapshot = CppModelManagerInterface::instance()->snapshot();
info.snapshot.insert(info.doc);
CanonicalSymbol cs(this, info);
@@ -778,7 +778,7 @@ static QList<int> lazyFindReferences(Scope *scope, QString code, Document::Ptr d
snapshot.insert(doc);
typeOfExpression.init(doc, snapshot);
if (Symbol *canonicalSymbol = CanonicalSymbol::canonicalSymbol(scope, code, typeOfExpression)) {
- return CppTools::CppModelManagerInterface::instance()->references(canonicalSymbol, typeOfExpression.context());
+ return CppModelManagerInterface::instance()->references(canonicalSymbol, typeOfExpression.context());
}
return QList<int>();
}
diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h
index 7483430692..64f86846d9 100644
--- a/src/plugins/cppeditor/cppeditor.h
+++ b/src/plugins/cppeditor/cppeditor.h
@@ -38,6 +38,7 @@
#include "cppquickfix.h"
#include "cppsemanticinfo.h"
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/LookupContext.h>
#include <texteditor/basetexteditor.h>
@@ -178,7 +179,7 @@ public:
virtual void paste(); // reimplemented from BaseTextEditor
virtual void cut(); // reimplemented from BaseTextEditor
- CppTools::CppModelManagerInterface *modelManager() const;
+ CPlusPlus::CppModelManagerInterface *modelManager() const;
virtual void setMimeType(const QString &mt);
@@ -273,7 +274,7 @@ private:
QModelIndex indexForPosition(int line, int column, const QModelIndex &rootIndex = QModelIndex()) const;
- CppTools::CppModelManagerInterface *m_modelManager;
+ CPlusPlus::CppModelManagerInterface *m_modelManager;
QComboBox *m_outlineCombo;
CPlusPlus::OverviewModel *m_outlineModel;
diff --git a/src/plugins/cppeditor/cppelementevaluator.cpp b/src/plugins/cppeditor/cppelementevaluator.cpp
index 1028921a4d..27e03c0dea 100644
--- a/src/plugins/cppeditor/cppelementevaluator.cpp
+++ b/src/plugins/cppeditor/cppelementevaluator.cpp
@@ -34,7 +34,6 @@
#include "cppelementevaluator.h"
#include <coreplugin/ifile.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <FullySpecifiedType.h>
#include <Names.h>
@@ -42,6 +41,7 @@
#include <Scope.h>
#include <Symbol.h>
#include <Symbols.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
@@ -86,7 +86,7 @@ namespace {
CppElementEvaluator::CppElementEvaluator(CPPEditor *editor) :
m_editor(editor),
- m_modelManager(CppTools::CppModelManagerInterface::instance()),
+ m_modelManager(CppModelManagerInterface::instance()),
m_tc(editor->textCursor()),
m_lookupBaseClasses(false)
{}
diff --git a/src/plugins/cppeditor/cppelementevaluator.h b/src/plugins/cppeditor/cppelementevaluator.h
index ef9833960e..f69bf561d6 100644
--- a/src/plugins/cppeditor/cppelementevaluator.h
+++ b/src/plugins/cppeditor/cppelementevaluator.h
@@ -82,7 +82,7 @@ private:
const CPlusPlus::LookupContext &lookupContext);
CPPEditor *m_editor;
- CppTools::CppModelManagerInterface *m_modelManager;
+ CPlusPlus::CppModelManagerInterface *m_modelManager;
QTextCursor m_tc;
bool m_lookupBaseClasses;
QSharedPointer<CppElement> m_element;
diff --git a/src/plugins/cppeditor/cppfilewizard.cpp b/src/plugins/cppeditor/cppfilewizard.cpp
index 0347f9f862..5efc98cc9c 100644
--- a/src/plugins/cppeditor/cppfilewizard.cpp
+++ b/src/plugins/cppeditor/cppfilewizard.cpp
@@ -35,7 +35,7 @@
#include "cppeditor.h"
#include "cppeditorconstants.h"
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <utils/codegeneration.h>
#include <QtCore/QTextStream>
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index b1869c053c..9d44edbaf0 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -38,7 +38,7 @@
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/helpmanager.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp
index 4935b91283..7a0b77fab7 100644
--- a/src/plugins/cppeditor/cppplugin.cpp
+++ b/src/plugins/cppeditor/cppplugin.cpp
@@ -62,8 +62,8 @@
#include <texteditor/texteditorplugin.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/texteditorconstants.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/cpptoolsconstants.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <QtCore/QFileInfo>
#include <QtCore/QSettings>
@@ -307,7 +307,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cppToolsMenu->addAction(createSeparator(am, this, globalContext, CppEditor::Constants::SEPARATOR4));
m_updateCodeModelAction = new QAction(tr("Update Code Model"), this);
cmd = am->registerAction(m_updateCodeModelAction, Core::Id(Constants::UPDATE_CODEMODEL), globalContext);
- CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
+ CPlusPlus::CppModelManagerInterface *cppModelManager = CPlusPlus::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
diff --git a/src/plugins/cppeditor/cppquickfixcollector.cpp b/src/plugins/cppeditor/cppquickfixcollector.cpp
index 7525752c86..f90baade9a 100644
--- a/src/plugins/cppeditor/cppquickfixcollector.cpp
+++ b/src/plugins/cppeditor/cppquickfixcollector.cpp
@@ -36,9 +36,9 @@
#include <extensionsystem/pluginmanager.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/cpprefactoringchanges.h>
#include <cpptools/cpptoolsconstants.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <AST.h>
#include <cplusplus/ASTPath.h>
@@ -56,7 +56,7 @@ CppQuickFixCollector::~CppQuickFixCollector()
bool CppQuickFixCollector::supportsEditor(TextEditor::ITextEditable *editor)
{
- return CppTools::CppModelManagerInterface::instance()->isCppEditor(editor);
+ return CPlusPlus::CppModelManagerInterface::instance()->isCppEditor(editor);
}
TextEditor::QuickFixState *CppQuickFixCollector::initializeCompletion(TextEditor::BaseTextEditor *editor)
@@ -78,7 +78,7 @@ TextEditor::QuickFixState *CppQuickFixCollector::initializeCompletion(TextEditor
CppQuickFixState *state = new CppQuickFixState(editor);
state->_path = path;
state->_semanticInfo = info;
- state->_snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
+ state->_snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
state->_context = CPlusPlus::LookupContext(info.doc, state->snapshot());
return state;
}
diff --git a/src/plugins/cpptools/abstracteditorsupport.cpp b/src/plugins/cpptools/abstracteditorsupport.cpp
index f032b9b482..2c0e3043ad 100644
--- a/src/plugins/cpptools/abstracteditorsupport.cpp
+++ b/src/plugins/cpptools/abstracteditorsupport.cpp
@@ -31,7 +31,7 @@
**
**************************************************************************/
-#include "cppmodelmanagerinterface.h"
+#include "abstracteditorsupport.h"
#include "cpptoolsconstants.h"
#include "cppfilesettingspage.h"
@@ -46,6 +46,8 @@
#include <coreplugin/icore.h>
#include <QtCore/QDebug>
+using namespace CPlusPlus;
+
namespace CppTools {
AbstractEditorSupport::AbstractEditorSupport(CppModelManagerInterface *modelmanager) :
diff --git a/src/plugins/cpptools/abstracteditorsupport.h b/src/plugins/cpptools/abstracteditorsupport.h
new file mode 100644
index 0000000000..d78c43ae12
--- /dev/null
+++ b/src/plugins/cpptools/abstracteditorsupport.h
@@ -0,0 +1,67 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef ABSTRACTEDITORSUPPORT_H
+#define ABSTRACTEDITORSUPPORT_H
+
+#include "cpptools_global.h"
+
+#include <cplusplus/ModelManagerInterface.h>
+
+namespace CppTools {
+
+class CPPTOOLS_EXPORT AbstractEditorSupport
+{
+public:
+ explicit AbstractEditorSupport(CPlusPlus::CppModelManagerInterface *modelmanager);
+ virtual ~AbstractEditorSupport();
+
+ virtual QByteArray contents() const = 0;
+ virtual QString fileName() const = 0;
+
+ void updateDocument();
+
+ // TODO: find a better place for common utility functions
+ static QString functionAt(const CPlusPlus::CppModelManagerInterface *mm,
+ const QString &fileName,
+ int line, int column);
+
+ static QString licenseTemplate(const QString &file = QString(), const QString &className = QString());
+
+private:
+ CPlusPlus::CppModelManagerInterface *m_modelmanager;
+};
+
+}
+
+#endif // ABSTRACTEDITORSUPPORT_H
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 99726282e6..c1ef4ddae0 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -32,7 +32,6 @@
**************************************************************************/
#include "cppfindreferences.h"
-#include "cppmodelmanagerinterface.h"
#include "cpptoolsconstants.h"
#include <texteditor/basetexteditor.h>
@@ -54,6 +53,7 @@
#include <Names.h>
#include <Scope.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/Overview.h>
#include <cplusplus/FindUsages.h>
@@ -72,7 +72,7 @@ using namespace CppTools::Internal;
using namespace CPlusPlus;
static QString getSource(const QString &fileName,
- const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy)
+ const CppModelManagerInterface::WorkingCopy &workingCopy)
{
if (workingCopy.contains(fileName)) {
return workingCopy.source(fileName);
@@ -89,13 +89,13 @@ namespace {
class ProcessFile: public std::unary_function<QString, QList<Usage> >
{
- const CppTools::CppModelManagerInterface::WorkingCopy workingCopy;
+ const CppModelManagerInterface::WorkingCopy workingCopy;
const Snapshot snapshot;
Document::Ptr symbolDocument;
Symbol *symbol;
public:
- ProcessFile(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy,
+ ProcessFile(const CppModelManagerInterface::WorkingCopy &workingCopy,
const Snapshot snapshot,
Document::Ptr symbolDocument,
Symbol *symbol)
@@ -157,7 +157,7 @@ public:
} // end of anonymous namespace
-CppFindReferences::CppFindReferences(CppTools::CppModelManagerInterface *modelManager)
+CppFindReferences::CppFindReferences(CppModelManagerInterface *modelManager)
: QObject(modelManager),
_modelManager(modelManager),
_resultWindow(Find::SearchResultWindow::instance())
@@ -183,7 +183,7 @@ QList<int> CppFindReferences::references(Symbol *symbol, const LookupContext &co
}
static void find_helper(QFutureInterface<Usage> &future,
- const CppTools::CppModelManagerInterface::WorkingCopy workingCopy,
+ const CppModelManagerInterface::WorkingCopy workingCopy,
const LookupContext context,
CppFindReferences *findRefs,
Symbol *symbol)
@@ -260,7 +260,7 @@ void CppFindReferences::findAll_helper(Symbol *symbol, const LookupContext &cont
_resultWindow->popup(true);
- const CppTools::CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
+ const CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
@@ -321,12 +321,12 @@ namespace {
class FindMacroUsesInFile: public std::unary_function<QString, QList<Usage> >
{
- const CppTools::CppModelManagerInterface::WorkingCopy workingCopy;
+ const CppModelManagerInterface::WorkingCopy workingCopy;
const Snapshot snapshot;
const Macro &macro;
public:
- FindMacroUsesInFile(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy,
+ FindMacroUsesInFile(const CppModelManagerInterface::WorkingCopy &workingCopy,
const Snapshot snapshot,
const Macro &macro)
: workingCopy(workingCopy), snapshot(snapshot), macro(macro)
@@ -388,7 +388,7 @@ public:
} // end of anonymous namespace
static void findMacroUses_helper(QFutureInterface<Usage> &future,
- const CppTools::CppModelManagerInterface::WorkingCopy workingCopy,
+ const CppModelManagerInterface::WorkingCopy workingCopy,
const Snapshot snapshot,
CppFindReferences *findRefs,
const Macro macro)
diff --git a/src/plugins/cpptools/cppfindreferences.h b/src/plugins/cpptools/cppfindreferences.h
index ab1378ce2a..1652851264 100644
--- a/src/plugins/cpptools/cppfindreferences.h
+++ b/src/plugins/cpptools/cppfindreferences.h
@@ -51,9 +51,11 @@ namespace Find {
struct SearchResultItem;
} // end of namespace Find
-namespace CppTools {
+namespace CPlusPlus {
class CppModelManagerInterface;
+}
+namespace CppTools {
namespace Internal {
class CppFindReferences: public QObject
@@ -61,7 +63,7 @@ class CppFindReferences: public QObject
Q_OBJECT
public:
- CppFindReferences(CppModelManagerInterface *modelManager);
+ CppFindReferences(CPlusPlus::CppModelManagerInterface *modelManager);
virtual ~CppFindReferences();
QList<int> references(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context) const;
@@ -90,7 +92,7 @@ private:
void setDependencyTable(const CPlusPlus::DependencyTable &newTable);
private:
- QPointer<CppModelManagerInterface> _modelManager;
+ QPointer<CPlusPlus::CppModelManagerInterface> _modelManager;
Find::SearchResultWindow *_resultWindow;
QFutureWatcher<CPlusPlus::Usage> m_watcher;
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index f476e86ae0..efe8175dcb 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -35,6 +35,7 @@
#include <cplusplus/Overview.h>
#include "cppmodelmanager.h"
+#include "abstracteditorsupport.h"
#ifndef ICHECK_BUILD
# include "cpptoolsconstants.h"
# include "cpptoolseditorsupport.h"
@@ -189,7 +190,7 @@ CppPreprocessor::~CppPreprocessor()
void CppPreprocessor::setRevision(unsigned revision)
{ m_revision = revision; }
-void CppPreprocessor::setWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy)
+void CppPreprocessor::setWorkingCopy(const CppModelManagerInterface::WorkingCopy &workingCopy)
{ m_workingCopy = workingCopy; }
void CppPreprocessor::setIncludePaths(const QStringList &includePaths)
@@ -617,7 +618,7 @@ Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
}
#ifndef ICHECK_BUILD
-void CppTools::CppModelManagerInterface::updateModifiedSourceFiles()
+void CppModelManager::updateModifiedSourceFiles()
{
const Snapshot snapshot = this->snapshot();
QStringList sourceFiles;
@@ -636,11 +637,10 @@ void CppTools::CppModelManagerInterface::updateModifiedSourceFiles()
updateSourceFiles(sourceFiles);
}
-CppTools::CppModelManagerInterface *CppTools::CppModelManagerInterface::instance()
+CppModelManager *CppModelManager::instance()
{
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
- return pluginManager->getObject<CppTools::CppModelManagerInterface>();
-
+ return pluginManager->getObject<CppModelManager>();
}
@@ -1417,5 +1417,6 @@ void CppModelManager::GC()
m_snapshot = newSnapshot;
protectSnapshot.unlock();
}
+
#endif
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h
index e167832eb5..865421a16e 100644
--- a/src/plugins/cpptools/cppmodelmanager.h
+++ b/src/plugins/cpptools/cppmodelmanager.h
@@ -34,7 +34,8 @@
#ifndef CPPMODELMANAGER_H
#define CPPMODELMANAGER_H
-#include <cpptools/cppmodelmanagerinterface.h>
+#include "cpptools_global.h"
+#include <cplusplus/ModelManagerInterface.h>
#ifndef ICHECK_BUILD
# include <projectexplorer/project.h>
#endif
@@ -83,7 +84,7 @@ class CppPreprocessor;
class CppFindReferences;
#ifndef ICHECK_BUILD
-class CppModelManager : public CppModelManagerInterface
+class CppModelManager : public CPlusPlus::CppModelManagerInterface
{
Q_OBJECT
@@ -91,6 +92,8 @@ public:
CppModelManager(QObject *parent);
virtual ~CppModelManager();
+ static CppModelManager *instance();
+
virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles);
virtual WorkingCopy workingCopy() const;
@@ -139,6 +142,7 @@ Q_SIGNALS:
public Q_SLOTS:
void editorOpened(Core::IEditor *editor);
void editorAboutToClose(Core::IEditor *editor);
+ virtual void updateModifiedSourceFiles();
private Q_SLOTS:
// this should be executed in the GUI thread.
@@ -251,7 +255,7 @@ public:
virtual ~CppPreprocessor();
void setRevision(unsigned revision);
- void setWorkingCopy(const CppModelManagerInterface::WorkingCopy &workingCopy);
+ void setWorkingCopy(const CPlusPlus::CppModelManagerInterface::WorkingCopy &workingCopy);
void setIncludePaths(const QStringList &includePaths);
void setFrameworkPaths(const QStringList &frameworkPaths);
void addFrameworkPath(const QString &frameworkPath);
@@ -299,7 +303,7 @@ private:
CPlusPlus::Preprocessor preprocess;
QStringList m_includePaths;
QStringList m_systemIncludePaths;
- CppModelManagerInterface::WorkingCopy m_workingCopy;
+ CPlusPlus::CppModelManagerInterface::WorkingCopy m_workingCopy;
QStringList m_projectFiles;
QStringList m_frameworkPaths;
QSet<QString> m_included;
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h
deleted file mode 100644
index 4dcc96d8a0..0000000000
--- a/src/plugins/cpptools/cppmodelmanagerinterface.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#ifndef CPPMODELMANAGERINTERFACE_H
-#define CPPMODELMANAGERINTERFACE_H
-
-#include <cpptools/cpptools_global.h>
-#include <cplusplus/CppDocument.h>
-#include <QtCore/QObject>
-#include <QtCore/QHash>
-#include <QtCore/QPointer>
-#include <QtCore/QStringList>
-#include <QtCore/QFuture>
-
-namespace Core {
- class IEditor;
-}
-
-namespace CPlusPlus {
- class LookupContext;
-}
-
-namespace ProjectExplorer {
- class Project;
-}
-
-namespace TextEditor {
- class ITextEditor;
-}
-
-namespace CppTools {
-
-class AbstractEditorSupport;
-
-namespace Internal {
-class CppEditorSupport;
-}
-
-class CPPTOOLS_EXPORT CppModelManagerInterface : public QObject
-{
- Q_OBJECT
-
-public:
- class ProjectInfo
- {
- public:
- ProjectInfo()
- { }
-
- ProjectInfo(QPointer<ProjectExplorer::Project> project)
- : project(project)
- { }
-
- operator bool() const
- { return ! project.isNull(); }
-
- bool isValid() const
- { return ! project.isNull(); }
-
- bool isNull() const
- { return project.isNull(); }
-
- public: // attributes
- QPointer<ProjectExplorer::Project> project;
- QString projectPath;
- QByteArray defines;
- QStringList sourceFiles;
- QStringList includePaths;
- QStringList frameworkPaths;
- QStringList precompiledHeaders;
- };
-
- class WorkingCopy
- {
- public:
- void insert(const QString &fileName, const QString &source, unsigned revision = 0)
- { _elements.insert(fileName, qMakePair(source, revision)); }
-
- bool contains(const QString &fileName) const
- { return _elements.contains(fileName); }
-
- QString source(const QString &fileName) const
- { return _elements.value(fileName).first; }
-
- QPair<QString, unsigned> get(const QString &fileName) const
- { return _elements.value(fileName); }
-
- private:
- typedef QHash<QString, QPair<QString, unsigned> > Table;
- Table _elements;
- };
-
-public:
- CppModelManagerInterface(QObject *parent = 0) : QObject(parent) {}
- virtual ~CppModelManagerInterface() {}
-
- static CppModelManagerInterface *instance();
-
- virtual bool isCppEditor(Core::IEditor *editor) const = 0;
-
- virtual WorkingCopy workingCopy() const = 0;
- virtual CPlusPlus::Snapshot snapshot() const = 0;
-
- virtual QList<ProjectInfo> projectInfos() const = 0;
- virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const = 0;
- virtual void updateProjectInfo(const ProjectInfo &pinfo) = 0;
-
- virtual QStringList includesInPath(const QString &path) const = 0;
-
- virtual void addEditorSupport(AbstractEditorSupport *editorSupport) = 0;
- virtual void removeEditorSupport(AbstractEditorSupport *editorSupport) = 0;
-
- virtual QList<int> references(CPlusPlus::Symbol *symbol,
- const CPlusPlus::LookupContext &context) = 0;
-
- virtual void renameUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context,
- const QString &replacement = QString()) = 0;
- virtual void findUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context) = 0;
-
- virtual void findMacroUsages(const CPlusPlus::Macro &macro) = 0;
-
-Q_SIGNALS:
- void documentUpdated(CPlusPlus::Document::Ptr doc);
-
-public Q_SLOTS:
- void updateModifiedSourceFiles();
- virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles) = 0;
- virtual void GC() = 0;
-};
-
-class CPPTOOLS_EXPORT AbstractEditorSupport
-{
-public:
- explicit AbstractEditorSupport(CppModelManagerInterface *modelmanager);
- virtual ~AbstractEditorSupport();
-
- virtual QByteArray contents() const = 0;
- virtual QString fileName() const = 0;
-
- void updateDocument();
-
- // TODO: find a better place for common utility functions
- static QString functionAt(const CppModelManagerInterface *mm,
- const QString &fileName,
- int line, int column);
-
- static QString licenseTemplate(const QString &file = QString(), const QString &className = QString());
-
-private:
- CppModelManagerInterface *m_modelmanager;
-};
-
-} // namespace CppTools
-
-#endif // CPPMODELMANAGERINTERFACE_H
diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp
index 29f44a7654..7633150f15 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.cpp
+++ b/src/plugins/cpptools/cpprefactoringchanges.cpp
@@ -36,6 +36,7 @@
#include <TranslationUnit.h>
#include <AST.h>
#include <cpptools/cppcodeformatter.h>
+#include <cpptools/cppmodelmanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/tabsettings.h>
@@ -47,7 +48,7 @@ using namespace Utils;
CppRefactoringChanges::CppRefactoringChanges(const Snapshot &snapshot)
: m_snapshot(snapshot)
- , m_modelManager(CppTools::CppModelManagerInterface::instance())
+ , m_modelManager(Internal::CppModelManager::instance())
{
Q_ASSERT(m_modelManager);
m_workingCopy = m_modelManager->workingCopy();
diff --git a/src/plugins/cpptools/cpprefactoringchanges.h b/src/plugins/cpptools/cpprefactoringchanges.h
index d4add01b5e..2e86d2fec9 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.h
+++ b/src/plugins/cpptools/cpprefactoringchanges.h
@@ -35,10 +35,10 @@
#define CPPREFACTORINGCHANGES_H
#include <ASTfwd.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/LookupContext.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptools_global.h>
#include <texteditor/refactoringchanges.h>
@@ -99,8 +99,8 @@ private:
CPlusPlus::Document::Ptr m_thisDocument;
CPlusPlus::Snapshot m_snapshot;
CPlusPlus::LookupContext m_context;
- CppTools::CppModelManagerInterface *m_modelManager;
- CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy;
+ CPlusPlus::CppModelManagerInterface *m_modelManager;
+ CPlusPlus::CppModelManagerInterface::WorkingCopy m_workingCopy;
};
} // namespace CppTools
diff --git a/src/plugins/cpptools/cpptools.pro b/src/plugins/cpptools/cpptools.pro
index 57507f3612..f970e74860 100644
--- a/src/plugins/cpptools/cpptools.pro
+++ b/src/plugins/cpptools/cpptools.pro
@@ -14,7 +14,6 @@ HEADERS += completionsettingspage.h \
cppcurrentdocumentfilter.h \
cppfunctionsfilter.h \
cppmodelmanager.h \
- cppmodelmanagerinterface.h \
cpplocatorfilter.h \
cpptools_global.h \
cpptoolsconstants.h \
@@ -28,7 +27,8 @@ HEADERS += completionsettingspage.h \
symbolsfindfilter.h \
uicodecompletionsupport.h \
insertionpointlocator.h \
- cpprefactoringchanges.h
+ cpprefactoringchanges.h \
+ abstracteditorsupport.h
SOURCES += completionsettingspage.cpp \
cppclassesfilter.cpp \
diff --git a/src/plugins/cpptools/uicodecompletionsupport.cpp b/src/plugins/cpptools/uicodecompletionsupport.cpp
index 945425aa11..e0e2c35c2a 100644
--- a/src/plugins/cpptools/uicodecompletionsupport.cpp
+++ b/src/plugins/cpptools/uicodecompletionsupport.cpp
@@ -37,11 +37,12 @@
enum { debug = 0 };
using namespace CppTools;
+using namespace CPlusPlus;
-UiCodeModelSupport::UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+UiCodeModelSupport::UiCodeModelSupport(CppModelManagerInterface *modelmanager,
const QString &source,
const QString &uiHeaderFile)
- : CppTools::AbstractEditorSupport(modelmanager),
+ : AbstractEditorSupport(modelmanager),
m_sourceName(source),
m_fileName(uiHeaderFile),
m_updateIncludingFiles(false),
diff --git a/src/plugins/cpptools/uicodecompletionsupport.h b/src/plugins/cpptools/uicodecompletionsupport.h
index cac8219445..9afbe967e4 100644
--- a/src/plugins/cpptools/uicodecompletionsupport.h
+++ b/src/plugins/cpptools/uicodecompletionsupport.h
@@ -35,17 +35,19 @@
#ifndef UICODECOMPLETIONSUPPORT_H
#define UICODECOMPLETIONSUPPORT_H
-#include "cppmodelmanagerinterface.h"
#include "cpptools_global.h"
+#include "abstracteditorsupport.h"
+
+#include <cplusplus/ModelManagerInterface.h>
#include <QtCore/QDateTime>
namespace CppTools {
-class CPPTOOLS_EXPORT UiCodeModelSupport : public CppTools::AbstractEditorSupport
+class CPPTOOLS_EXPORT UiCodeModelSupport : public AbstractEditorSupport
{
public:
- UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+ UiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
const QString &sourceFile,
const QString &uiHeaderFile);
~UiCodeModelSupport();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index a2a236ef3e..684e7ab1cf 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -85,7 +85,7 @@
#include <coreplugin/modemanager.h>
#include <cppeditor/cppeditorconstants.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
@@ -2404,9 +2404,8 @@ void DebuggerPluginPrivate::coreShutdown()
const CPlusPlus::Snapshot &DebuggerPluginPrivate::cppCodeModelSnapshot() const
{
- using namespace CppTools;
if (m_codeModelSnapshot.isEmpty() && action(UseCodeModel)->isChecked())
- m_codeModelSnapshot = CppModelManagerInterface::instance()->snapshot();
+ m_codeModelSnapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
return m_codeModelSnapshot;
}
diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp
index 65a2c97453..16fd64ace1 100644
--- a/src/plugins/debugger/watchutils.cpp
+++ b/src/plugins/debugger/watchutils.cpp
@@ -46,9 +46,10 @@
#include <texteditor/texteditorconstants.h>
#include <coreplugin/editormanager/editormanager.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptoolsconstants.h>
+#include <cpptools/abstracteditorsupport.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/Overview.h>
#include <Symbols.h>
@@ -709,13 +710,13 @@ bool currentTextEditorPosition(QString *fileNameIn /* = 0 */,
return !fileName.isEmpty();
}
-static CppTools::CppModelManagerInterface *cppModelManager()
+static CPlusPlus::CppModelManagerInterface *cppModelManager()
{
- using namespace CppTools;
+ using namespace CPlusPlus;
static QPointer<CppModelManagerInterface> modelManager;
if (!modelManager.data())
modelManager = ExtensionSystem::PluginManager::instance()->
- getObject<CppTools::CppModelManagerInterface>();
+ getObject<CPlusPlus::CppModelManagerInterface>();
return modelManager.data();
}
@@ -724,6 +725,7 @@ QString cppExpressionAt(TextEditor::ITextEditor *editor, int pos,
int *line, int *column, QString *function /* = 0 */)
{
using namespace CppTools;
+ using namespace CPlusPlus;
*line = *column = 0;
if (function)
function->clear();
diff --git a/src/plugins/designer/codemodelhelpers.cpp b/src/plugins/designer/codemodelhelpers.cpp
index 0084d54a91..633f5a47b8 100644
--- a/src/plugins/designer/codemodelhelpers.cpp
+++ b/src/plugins/designer/codemodelhelpers.cpp
@@ -33,7 +33,7 @@
#include "codemodelhelpers.h"
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/CoreTypes.h>
#include <cplusplus/Name.h>
@@ -133,7 +133,7 @@ bool navigateToSlot(const QString &uiFileName,
*errorMessage = QCoreApplication::translate("Designer", "The generated header of the form '%1' could not be found.\nRebuilding the project might help.").arg(uiFileName);
return false;
}
- const CPlusPlus::Snapshot snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
+ const CPlusPlus::Snapshot snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
const DocumentPtr generatedHeaderDoc = snapshot.document(generatedHeaderFile);
if (!generatedHeaderDoc) {
*errorMessage = QCoreApplication::translate("Designer", "The generated header '%1' could not be found in the code model.\nRebuilding the project might help.").arg(generatedHeaderFile);
diff --git a/src/plugins/designer/cpp/formclasswizardparameters.cpp b/src/plugins/designer/cpp/formclasswizardparameters.cpp
index bdba527ef2..88798e923b 100644
--- a/src/plugins/designer/cpp/formclasswizardparameters.cpp
+++ b/src/plugins/designer/cpp/formclasswizardparameters.cpp
@@ -35,7 +35,7 @@
#include "formtemplatewizardpage.h"
#include <utils/codegeneration.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <QtCore/QTextStream>
#include <QtCore/QSettings>
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index 345ba97d01..33794fcf54 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -40,10 +40,10 @@
#include "codemodelhelpers.h"
#include <widgethost.h>
-#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpprefactoringchanges.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/insertionpointlocator.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/Overview.h>
#include <cplusplus/CoreTypes.h>
@@ -89,10 +89,10 @@ static QString msgClassNotFound(const QString &uiClassName, const QList<Document
return QtCreatorIntegration::tr("The class definition of '%1' could not be found in %2.").arg(uiClassName, files);
}
-static inline CppTools::CppModelManagerInterface *cppModelManagerInstance()
+static inline CppModelManagerInterface *cppModelManagerInstance()
{
return ExtensionSystem::PluginManager::instance()
- ->getObject<CppTools::CppModelManagerInterface>();
+ ->getObject<CppModelManagerInterface>();
}
QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, FormEditorW *parent) :
@@ -259,7 +259,7 @@ static Function *findDeclaration(const Class *cl, const QString &functionName)
// TODO: remove me, this is taken from cppeditor.cpp. Find some common place for this method
static Document::Ptr findDefinition(Function *functionDeclaration, int *line)
{
- if (CppTools::CppModelManagerInterface *cppModelManager = cppModelManagerInstance()) {
+ if (CppModelManagerInterface *cppModelManager = cppModelManagerInstance()) {
const Snapshot snapshot = cppModelManager->snapshot();
if (Symbol *def = snapshot.findMatchingDefinition(functionDeclaration)) {
@@ -490,7 +490,7 @@ static inline QString uiClassName(QString formObjectName)
return formObjectName;
}
-static Document::Ptr getParsedDocument(const QString &fileName, CppTools::CppModelManagerInterface::WorkingCopy &workingCopy, Snapshot &snapshot)
+static Document::Ptr getParsedDocument(const QString &fileName, CppModelManagerInterface::WorkingCopy &workingCopy, Snapshot &snapshot)
{
QString src;
if (workingCopy.contains(fileName)) {
@@ -606,7 +606,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
}
} else {
// add function declaration to cl
- CppTools::CppModelManagerInterface::WorkingCopy workingCopy = cppModelManagerInstance()->workingCopy();
+ CppModelManagerInterface::WorkingCopy workingCopy = cppModelManagerInstance()->workingCopy();
const QString fileName = doc->fileName();
getParsedDocument(fileName, workingCopy, docTable);
addDeclaration(docTable, fileName, cl, functionNameWithParameterNames);
diff --git a/src/plugins/designer/qtcreatorintegration.h b/src/plugins/designer/qtcreatorintegration.h
index 247736cae0..0d9e0856f6 100644
--- a/src/plugins/designer/qtcreatorintegration.h
+++ b/src/plugins/designer/qtcreatorintegration.h
@@ -34,7 +34,7 @@
#ifndef QTCREATORINTEGRATION_H
#define QTCREATORINTEGRATION_H
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include "qt_private/qdesigner_integration_p.h"
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index 84913d2096..8137fd1464 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -41,7 +41,7 @@
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/pathchooser.h>
#include <coreplugin/icore.h>
@@ -203,13 +203,13 @@ void GenericProject::refresh(RefreshOptions options)
if (options & Files)
m_rootNode->refresh();
- CppTools::CppModelManagerInterface *modelManager =
- ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager =
+ ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
if (m_toolChain && modelManager) {
const QByteArray predefinedMacros = m_toolChain->predefinedMacros();
- CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
+ CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
pinfo.defines = predefinedMacros;
pinfo.defines += '\n';
pinfo.defines += m_defines;
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
index 0d0ed1ebc8..ef415e98e8 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
@@ -36,7 +36,7 @@
#include <coreplugin/basefilewizard.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 52d0335d1d..e404998d6d 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -51,7 +51,7 @@
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/vcsmanager.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorer.h>
@@ -1328,8 +1328,8 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project,
Qt4ProFileNode::~Qt4ProFileNode()
{
- CppTools::CppModelManagerInterface *modelManager
- = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager
+ = ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
QMap<QString, Qt4UiCodeModelSupport *>::const_iterator it, end;
end = m_uiCodeModelSupport.constEnd();
for (it = m_uiCodeModelSupport.constBegin(); it != end; ++it) {
@@ -1890,8 +1890,8 @@ QStringList Qt4ProFileNode::updateUiFiles()
removeFileNodes(toRemove, this);
}
- CppTools::CppModelManagerInterface *modelManager =
- ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager =
+ ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
if (!toAdd.isEmpty()) {
foreach (FileNode *file, toAdd) {
@@ -2192,8 +2192,8 @@ QString Qt4ProFileNode::uiHeaderFile(const QString &uiDir, const QString &formFi
void Qt4ProFileNode::createUiCodeModelSupport()
{
// qDebug()<<"creatUiCodeModelSupport()";
- CppTools::CppModelManagerInterface *modelManager
- = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+ CPlusPlus::CppModelManagerInterface *modelManager
+ = ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
// First move all to
QMap<QString, Qt4UiCodeModelSupport *> oldCodeModelSupport;
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 4fc67eb505..26987b6ef2 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -51,7 +51,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <extensionsystem/pluginmanager.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cplusplus/ModelManagerInterface.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/buildenvironmentwidget.h>
@@ -421,9 +421,9 @@ void Qt4Project::updateCppCodeModel()
{
Qt4BuildConfiguration *activeBC = activeTarget()->activeBuildConfiguration();
- CppTools::CppModelManagerInterface *modelmanager =
+ CPlusPlus::CppModelManagerInterface *modelmanager =
ExtensionSystem::PluginManager::instance()
- ->getObject<CppTools::CppModelManagerInterface>();
+ ->getObject<CPlusPlus::CppModelManagerInterface>();
if (!modelmanager)
return;
@@ -544,7 +544,7 @@ void Qt4Project::updateCppCodeModel()
files += m_projectFiles->files[SourceType];
files += m_projectFiles->generatedFiles[SourceType];
- CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
+ CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
//qDebug()<<"Using precompiled header"<<allPrecompileHeaders;
diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
index ba33fb7cad..230e843b87 100644
--- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
+++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
@@ -40,7 +40,7 @@
using namespace Qt4ProjectManager;
using namespace Internal;
-Qt4UiCodeModelSupport::Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+Qt4UiCodeModelSupport::Qt4UiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
Qt4Project *project,
const QString &source,
const QString &uiHeaderFile)
diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.h b/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
index 8216990df8..d9eb01a7c7 100644
--- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
+++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
@@ -36,6 +36,10 @@
#include <cpptools/uicodecompletionsupport.h>
+namespace CPlusPlus {
+class CppModelManagerInterface;
+}
+
namespace Qt4ProjectManager {
class Qt4Project;
namespace Internal {
@@ -43,7 +47,7 @@ namespace Internal {
class Qt4UiCodeModelSupport : public CppTools::UiCodeModelSupport
{
public:
- Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+ Qt4UiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
Qt4Project *project,
const QString &sourceFile,
const QString &uiHeaderFile);
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
index 134293f318..3b0fb961e8 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
@@ -36,7 +36,7 @@
#include "consoleappwizarddialog.h"
#include "qt4projectmanagerconstants.h"
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <QtGui/QIcon>
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
index 83b0321a03..67b193cf94 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
@@ -36,7 +36,7 @@
#include "guiappwizarddialog.h"
#include "qt4projectmanagerconstants.h"
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <designer/cpp/formclasswizardparameters.h>
#include <coreplugin/icore.h>
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
index 4b75b02ab1..e886713b93 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
@@ -38,7 +38,7 @@
#include "mobilelibraryparameters.h"
#include <utils/codegeneration.h>
-#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/abstracteditorsupport.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QtCore/QDir>
diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.cpp b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
index 38e1870c47..96040a25d1 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
@@ -34,7 +34,7 @@
#include "testwizard.h"
#include "testwizarddialog.h"
-#include <cpptools/cppmodelmanager.h>
+#include <cpptools/abstracteditorsupport.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>