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

Method isUpdateRequired

kdevplatform/language/backgroundparser/parsejob.cpp:492–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492bool ParseJob::isUpdateRequired(const IndexedString& languageString)
493{
494 if (abortRequested()) {
495 return false;
496 }
497
498 if (minimumFeatures() & TopDUContext::ForceUpdate) {
499 return true;
500 }
501
502 DUChainReadLocker lock;
503 if (abortRequested()) {
504 return false;
505 }
506 const auto files = DUChain::self()->allEnvironmentFiles(document());
507 for (const ParsingEnvironmentFilePointer& file : files) {
508 if (file->language() != languageString) {
509 continue;
510 }
511 if (!file->needsUpdate(environment()) && file->featuresSatisfied(minimumFeatures())) {
512 qCDebug(LANGUAGE) << "Already up to date" << document().str();
513 setDuChain(file->topContext());
514 lock.unlock();
515 highlightDUChain();
516 return false;
517 }
518 break;
519 }
520
521 return !abortRequested();
522}
523
524const ParsingEnvironment* ParseJob::environment() const
525{

Callers

nothing calls this directly

Calls 7

allEnvironmentFilesMethod · 0.80
featuresSatisfiedMethod · 0.80
strMethod · 0.80
languageMethod · 0.45
needsUpdateMethod · 0.45
topContextMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected