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

Method rangeInCurrentRevision

kdevplatform/language/duchain/duchainbase.cpp:145–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145KTextEditor::Range DUChainBase::rangeInCurrentRevision() const
146{
147 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
148
149 if (tracker && topContext() && topContext()->parsingEnvironmentFile()) {
150 qint64 revision = topContext()->parsingEnvironmentFile()->modificationRevision().revision;
151 return tracker->transformToCurrentRevision(d_func()->m_range, revision);
152 }
153
154 // If the document is not open, we can simply cast the range over, as no translation can be done
155 return d_func()->m_range.castToSimpleRange();
156}
157
158PersistentMovingRange::Ptr DUChainBase::createRangeMoving() const
159{

Callers 15

operator()Method · 0.80
htmlMethod · 0.80
DeclarationWidgetMethod · 0.80
htmlMethod · 0.80
executeMethod · 0.80
textChangedMethod · 0.80
computeCompletionsMethod · 0.80
executeMethod · 0.80

Calls 8

urlFunction · 0.85
topContextFunction · 0.85
trackerForUrlMethod · 0.80
backgroundParserMethod · 0.80
languageControllerMethod · 0.80
modificationRevisionMethod · 0.80

Tested by 5

testBasicProblemsMethod · 0.64
testBasicRangeSupportMethod · 0.64
testChildDiagnosticsMethod · 0.64
testRangesMethod · 0.64
showSourceMethod · 0.64