Commit 20038ab7 authored by Denis Steckelmacher's avatar Denis Steckelmacher

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.
parent 75765e8b
...@@ -245,13 +245,22 @@ ReferencedTopDUContext ParseSession::contextOfFile(const QString& fileName) ...@@ -245,13 +245,22 @@ ReferencedTopDUContext ParseSession::contextOfFile(const QString& fileName)
BackgroundParser* bgparser = KDevelop::ICore::self()->languageController()->backgroundParser(); BackgroundParser* bgparser = KDevelop::ICore::self()->languageController()->backgroundParser();
if (!bgparser->isQueued(moduleFileString)) { if (!bgparser->isQueued(moduleFileString)) {
TopDUContext::Features features = (TopDUContext::Features)
(TopDUContext::ForceUpdate | TopDUContext::AllDeclarationsContextsAndUses);
// Schedule the parsing of the imported file // Schedule the parsing of the imported file
bgparser->addDocument(moduleFileString, TopDUContext::ForceUpdate, m_ownPriority - 1, bgparser->addDocument(moduleFileString,
0, ParseJob::FullSequentialProcessing); features,
m_ownPriority - 1,
if (!bgparser->isQueued(m_url)) { if (!bgparser->isQueued(m_url)) {
bgparser->addDocument(m_url, TopDUContext::ForceUpdate, m_ownPriority, bgparser->addDocument(m_url,
0, ParseJob::FullSequentialProcessing); features,
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment