MCPcopy Create free account
hub / github.com/KDE/kdevelop / checkDocument

Method checkDocument

kdevplatform/language/codecompletion/codecompletion.cpp:95–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void CodeCompletion::checkDocument(Document* textDocument)
96{
97 unregisterDocument(textDocument);
98
99 const auto langs = ICore::self()->languageController()->languagesForUrl(textDocument->url());
100
101 bool found = false;
102 for (const auto lang : langs) {
103 if (m_language == lang->name()) {
104 found = true;
105 break;
106 }
107 }
108
109 if (!found && !m_language.isEmpty())
110 return;
111
112 const auto views = textDocument->views();
113 for (KTextEditor::View* view : views) {
114 viewCreated(textDocument, view);
115 }
116
117 connect(textDocument, &Document::viewCreated, this, &CodeCompletion::viewCreated);
118}
119
120#include "moc_codecompletion.cpp"

Callers

nothing calls this directly

Calls 6

languagesForUrlMethod · 0.80
languageControllerMethod · 0.80
urlMethod · 0.45
nameMethod · 0.45
isEmptyMethod · 0.45
viewsMethod · 0.45

Tested by

no test coverage detected