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

Function createContext

plugins/clang/tests/test_codecompletion.cpp:130–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130QExplicitlySharedDataPointer<ClangCodeCompletionContext> createContext(const ReferencedTopDUContext& top,
131 const ParseSessionData::Ptr& sessionData,
132 const KTextEditor::Cursor position,
133 const QString& code = {})
134{
135 const auto url = top->url().toUrl();
136 const auto text = code.isEmpty() ? textForDocument(url, position) : code;
137 return QExplicitlySharedDataPointer<ClangCodeCompletionContext>{
138 new ClangCodeCompletionContext(DUContextPointer(top), sessionData, url, position, text)};
139}
140
141template<typename CustomTestFunction = NoopTestFunction>
142void executeCompletionTest(const ReferencedTopDUContext& top, const CompletionItems& expectedCompletionItems,

Calls 4

textForDocumentFunction · 0.85
toUrlMethod · 0.45
urlMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected