forked from qt-creator/qt-creator
CppEditor: Acknowledge the existence of clangd
Stop pretending to be super generic. Instead, let interested code know directly whether a document is under clangd's control. This saves code and makes the logic easier to understand. Change-Id: Ia19d0ec6c4e83926379a7d17ca53896bee3a50e1 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1264,19 +1264,9 @@ bool CppModelManager::isCppEditor(Core::IEditor *editor)
|
||||
return editor->context().contains(ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||
}
|
||||
|
||||
bool CppModelManager::supportsOutline(const TextEditor::TextDocument *document)
|
||||
bool CppModelManager::usesClangd(const TextEditor::TextDocument *document)
|
||||
{
|
||||
return instance()->d->m_activeModelManagerSupport->supportsOutline(document);
|
||||
}
|
||||
|
||||
bool CppModelManager::supportsLocalUses(const TextEditor::TextDocument *document)
|
||||
{
|
||||
return instance()->d->m_activeModelManagerSupport->supportsLocalUses(document);
|
||||
}
|
||||
|
||||
bool CppModelManager::hasSpecialHoverHandler(const TextEditor::TextDocument *document)
|
||||
{
|
||||
return instance()->d->m_activeModelManagerSupport->hasSpecialHoverHandler(document);
|
||||
return instance()->d->m_activeModelManagerSupport->usesClangd(document);
|
||||
}
|
||||
|
||||
bool CppModelManager::isClangCodeModelActive() const
|
||||
|
||||
Reference in New Issue
Block a user