From 20038ab7ba8367c0c03143c3c58e826827e54bcf Mon Sep 17 00:00:00 2001 From: Denis Steckelmacher Date: Tue, 24 Jun 2014 15:03:04 +0200 Subject: [PATCH] Build uses in imported files This may be a bit overkill in some situations, but it is required in order to have the "this symbol is defined here and used there" feature working without forcing the user to modify a file after having opened it to see the "imported" symbols. --- duchain/parsesession.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/duchain/parsesession.cpp b/duchain/parsesession.cpp index 65d2114e55..60cc429ccb 100644 --- a/duchain/parsesession.cpp +++ b/duchain/parsesession.cpp @@ -245,13 +245,22 @@ ReferencedTopDUContext ParseSession::contextOfFile(const QString& fileName) BackgroundParser* bgparser = KDevelop::ICore::self()->languageController()->backgroundParser(); if (!bgparser->isQueued(moduleFileString)) { + TopDUContext::Features features = (TopDUContext::Features) + (TopDUContext::ForceUpdate | TopDUContext::AllDeclarationsContextsAndUses); + // Schedule the parsing of the imported file - bgparser->addDocument(moduleFileString, TopDUContext::ForceUpdate, m_ownPriority - 1, - 0, ParseJob::FullSequentialProcessing); + bgparser->addDocument(moduleFileString, + features, + m_ownPriority - 1, + 0, + ParseJob::FullSequentialProcessing); if (!bgparser->isQueued(m_url)) { - bgparser->addDocument(m_url, TopDUContext::ForceUpdate, m_ownPriority, - 0, ParseJob::FullSequentialProcessing); + bgparser->addDocument(m_url, + features, + m_ownPriority, + 0, + ParseJob::FullSequentialProcessing); } } -- GitLab