forked from qt-creator/qt-creator
ClangCodeModel: Provide outline via clangd
Note that we used to encode the information about symbol visibility and static-ness in the icons, which we can't do anymore, because clangd does not provide this information. On the upside, this change likely fixes a ton of bugs, as our own outline was rather "quirky". Change-Id: I099f11ec4e3c6f52cd461fb43080bbdde3bed5e5 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1310,6 +1310,11 @@ bool CppModelManager::isCppEditor(Core::IEditor *editor)
|
||||
return editor->context().contains(ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||
}
|
||||
|
||||
bool CppModelManager::supportsOutline(const TextEditor::TextDocument *document)
|
||||
{
|
||||
return instance()->d->m_activeModelManagerSupport->supportsOutline(document);
|
||||
}
|
||||
|
||||
bool CppModelManager::isClangCodeModelActive() const
|
||||
{
|
||||
return d->m_activeModelManagerSupport != d->m_builtinModelManagerSupport;
|
||||
|
||||
@@ -142,6 +142,7 @@ public:
|
||||
void emitAbstractEditorSupportRemoved(const QString &filePath);
|
||||
|
||||
static bool isCppEditor(Core::IEditor *editor);
|
||||
static bool supportsOutline(const TextEditor::TextDocument *document);
|
||||
bool isClangCodeModelActive() const;
|
||||
|
||||
QSet<AbstractEditorSupport*> abstractEditorSupports() const;
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
virtual FollowSymbolInterface &followSymbolInterface() = 0;
|
||||
virtual RefactoringEngineInterface &refactoringEngineInterface() = 0;
|
||||
virtual std::unique_ptr<AbstractOverviewModel> createOverviewModel() = 0;
|
||||
virtual bool supportsOutline(const TextEditor::TextDocument *) const { return true; }
|
||||
};
|
||||
|
||||
class CPPTOOLS_EXPORT ModelManagerSupportProvider
|
||||
|
||||
Reference in New Issue
Block a user