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

Method execute

plugins/qmljs/codecompletion/items/modulecompletionitem.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void QmlJS::ModuleCompletionItem::execute(KTextEditor::View* view, const KTextEditor::Range& word)
72{
73 switch (m_decoration) {
74 case Import:
75 // Replace the whole line with an import statement
76 view->document()->replaceText(
77 KTextEditor::Range(word.start().line(), 0, word.start().line(), INT_MAX),
78 QLatin1String("import ") + m_name
79 );
80 break;
81 case Quotes:
82 view->document()->replaceText(word, QStringLiteral("\"%1\"").arg(m_name));
83 break;
84 }
85}

Callers

nothing calls this directly

Calls 4

RangeFunction · 0.50
documentMethod · 0.45
lineMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected