forked from qt-creator/qt-creator
Clang: Fix naming conventions for *ModelManagerSupport* classes
We use "Builtin" and "Clang" as prefixes, not suffixes. Change-Id: I6926aeb8f005176ef420c4421c257e3df61ee0b7 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "cppcompletionassist.h"
|
||||
#include "cppmodelmanagersupportinternal.h"
|
||||
#include "cppbuiltinmodelmanagersupport.h"
|
||||
#include "cppfollowsymbolundercursor.h"
|
||||
#include "cpphoverhandler.h"
|
||||
#include "cppoverviewmodel.h"
|
||||
@@ -38,60 +38,60 @@
|
||||
using namespace CppTools;
|
||||
using namespace CppTools::Internal;
|
||||
|
||||
QString ModelManagerSupportProviderInternal::id() const
|
||||
QString BuiltinModelManagerSupportProvider::id() const
|
||||
{
|
||||
return QLatin1String("CppTools.BuiltinCodeModel");
|
||||
}
|
||||
|
||||
QString ModelManagerSupportProviderInternal::displayName() const
|
||||
QString BuiltinModelManagerSupportProvider::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("ModelManagerSupportInternal::displayName",
|
||||
"%1 Built-in").arg(Core::Constants::IDE_DISPLAY_NAME);
|
||||
}
|
||||
|
||||
ModelManagerSupport::Ptr ModelManagerSupportProviderInternal::createModelManagerSupport()
|
||||
ModelManagerSupport::Ptr BuiltinModelManagerSupportProvider::createModelManagerSupport()
|
||||
{
|
||||
return ModelManagerSupport::Ptr(new ModelManagerSupportInternal);
|
||||
return ModelManagerSupport::Ptr(new BuiltinModelManagerSupport);
|
||||
}
|
||||
|
||||
ModelManagerSupportInternal::ModelManagerSupportInternal()
|
||||
BuiltinModelManagerSupport::BuiltinModelManagerSupport()
|
||||
: m_completionAssistProvider(new InternalCompletionAssistProvider),
|
||||
m_followSymbol(new FollowSymbolUnderCursor),
|
||||
m_refactoringEngine(new CppRefactoringEngine)
|
||||
{
|
||||
}
|
||||
|
||||
ModelManagerSupportInternal::~ModelManagerSupportInternal()
|
||||
BuiltinModelManagerSupport::~BuiltinModelManagerSupport()
|
||||
{
|
||||
}
|
||||
|
||||
BaseEditorDocumentProcessor *ModelManagerSupportInternal::createEditorDocumentProcessor(
|
||||
BaseEditorDocumentProcessor *BuiltinModelManagerSupport::createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument)
|
||||
{
|
||||
return new BuiltinEditorDocumentProcessor(baseTextDocument);
|
||||
}
|
||||
|
||||
CppCompletionAssistProvider *ModelManagerSupportInternal::completionAssistProvider()
|
||||
CppCompletionAssistProvider *BuiltinModelManagerSupport::completionAssistProvider()
|
||||
{
|
||||
return m_completionAssistProvider.data();
|
||||
}
|
||||
|
||||
TextEditor::BaseHoverHandler *ModelManagerSupportInternal::createHoverHandler()
|
||||
TextEditor::BaseHoverHandler *BuiltinModelManagerSupport::createHoverHandler()
|
||||
{
|
||||
return new CppHoverHandler;
|
||||
}
|
||||
|
||||
FollowSymbolInterface &ModelManagerSupportInternal::followSymbolInterface()
|
||||
FollowSymbolInterface &BuiltinModelManagerSupport::followSymbolInterface()
|
||||
{
|
||||
return *m_followSymbol;
|
||||
}
|
||||
|
||||
RefactoringEngineInterface &ModelManagerSupportInternal::refactoringEngineInterface()
|
||||
RefactoringEngineInterface &BuiltinModelManagerSupport::refactoringEngineInterface()
|
||||
{
|
||||
return *m_refactoringEngine;
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractOverviewModel> ModelManagerSupportInternal::createOverviewModel()
|
||||
std::unique_ptr<AbstractOverviewModel> BuiltinModelManagerSupport::createOverviewModel()
|
||||
{
|
||||
return std::make_unique<CppTools::OverviewModel>();
|
||||
}
|
||||
@@ -32,13 +32,13 @@
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
class ModelManagerSupportInternal: public ModelManagerSupport
|
||||
class BuiltinModelManagerSupport: public ModelManagerSupport
|
||||
{
|
||||
Q_DISABLE_COPY(ModelManagerSupportInternal)
|
||||
Q_DISABLE_COPY(BuiltinModelManagerSupport)
|
||||
|
||||
public:
|
||||
ModelManagerSupportInternal();
|
||||
virtual ~ModelManagerSupportInternal();
|
||||
BuiltinModelManagerSupport();
|
||||
virtual ~BuiltinModelManagerSupport();
|
||||
|
||||
CppCompletionAssistProvider *completionAssistProvider() final;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() final;
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
QScopedPointer<RefactoringEngineInterface> m_refactoringEngine;
|
||||
};
|
||||
|
||||
class ModelManagerSupportProviderInternal : public ModelManagerSupportProvider
|
||||
class BuiltinModelManagerSupportProvider : public ModelManagerSupportProvider
|
||||
{
|
||||
public:
|
||||
QString id() const override;
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "cppindexingsupport.h"
|
||||
#include "cpplocatordata.h"
|
||||
#include "cpplocatorfilter.h"
|
||||
#include "cppmodelmanagersupportinternal.h"
|
||||
#include "cppbuiltinmodelmanagersupport.h"
|
||||
#include "cppqtstyleindenter.h"
|
||||
#include "cpprefactoringchanges.h"
|
||||
#include "cpprefactoringengine.h"
|
||||
@@ -502,7 +502,7 @@ void CppModelManager::initCppTools()
|
||||
void CppModelManager::initializeBuiltinModelManagerSupport()
|
||||
{
|
||||
d->m_builtinModelManagerSupport
|
||||
= ModelManagerSupportProviderInternal().createModelManagerSupport();
|
||||
= BuiltinModelManagerSupportProvider().createModelManagerSupport();
|
||||
d->m_activeModelManagerSupport = d->m_builtinModelManagerSupport;
|
||||
d->m_refactoringEngines[RefactoringEngineType::BuiltIn] =
|
||||
&d->m_activeModelManagerSupport->refactoringEngineInterface();
|
||||
|
||||
@@ -48,7 +48,6 @@ HEADERS += \
|
||||
cpplocatorfilter.h \
|
||||
cppmodelmanager.h \
|
||||
cppmodelmanagersupport.h \
|
||||
cppmodelmanagersupportinternal.h \
|
||||
cppoverviewmodel.h \
|
||||
cpppointerdeclarationformatter.h \
|
||||
cppprojectfile.h \
|
||||
@@ -101,7 +100,8 @@ HEADERS += \
|
||||
wrappablelineedit.h \
|
||||
usages.h \
|
||||
cpptools_clangtidychecks.h \
|
||||
cppmodelmanagerinterface.h
|
||||
cppmodelmanagerinterface.h \
|
||||
cppbuiltinmodelmanagersupport.h
|
||||
|
||||
SOURCES += \
|
||||
abstracteditorsupport.cpp \
|
||||
@@ -146,7 +146,6 @@ SOURCES += \
|
||||
cpplocatorfilter.cpp \
|
||||
cppmodelmanager.cpp \
|
||||
cppmodelmanagersupport.cpp \
|
||||
cppmodelmanagersupportinternal.cpp \
|
||||
cppoverviewmodel.cpp \
|
||||
cpppointerdeclarationformatter.cpp \
|
||||
cppprojectfile.cpp \
|
||||
@@ -187,7 +186,8 @@ SOURCES += \
|
||||
compileroptionsbuilder.cpp \
|
||||
cppprojectfilecategorizer.cpp \
|
||||
cppprojectpartchooser.cpp \
|
||||
wrappablelineedit.cpp
|
||||
wrappablelineedit.cpp \
|
||||
cppbuiltinmodelmanagersupport.cpp
|
||||
|
||||
FORMS += \
|
||||
clangdiagnosticconfigswidget.ui \
|
||||
|
||||
@@ -56,6 +56,8 @@ Project {
|
||||
"clazychecks.ui",
|
||||
"compileroptionsbuilder.cpp",
|
||||
"compileroptionsbuilder.h",
|
||||
"cppbuiltinmodelmanagersupport.cpp",
|
||||
"cppbuiltinmodelmanagersupport.h",
|
||||
"cppcanonicalsymbol.cpp",
|
||||
"cppcanonicalsymbol.h",
|
||||
"cppchecksymbols.cpp",
|
||||
@@ -123,8 +125,6 @@ Project {
|
||||
"cppmodelmanager.h",
|
||||
"cppmodelmanagersupport.cpp",
|
||||
"cppmodelmanagersupport.h",
|
||||
"cppmodelmanagersupportinternal.cpp",
|
||||
"cppmodelmanagersupportinternal.h",
|
||||
"cppoverviewmodel.cpp",
|
||||
"cppoverviewmodel.h",
|
||||
"cpppointerdeclarationformatter.cpp",
|
||||
@@ -215,7 +215,7 @@ Project {
|
||||
"tidychecks.ui",
|
||||
"typehierarchybuilder.cpp",
|
||||
"typehierarchybuilder.h",
|
||||
"usages.h"
|
||||
"usages.h",
|
||||
]
|
||||
|
||||
Group {
|
||||
|
||||
Reference in New Issue
Block a user