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)
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);
}
}
......
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