Clang: Prioritize current and visible translation units

We reparse first the current and then the visible translation units before
we reparse all other units.

The signals connections are queued to wait for the visible editor update.

Change-Id: I5e2b8bc80568450268ca24e26720b3f5af640995
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-12-01 11:57:08 +01:00
parent db5bd69b26
commit d579608e8a
8 changed files with 121 additions and 4 deletions

View File

@@ -268,10 +268,12 @@ void ClangEditorDocumentProcessor::registerTranslationUnitForEditor(CppTools::Pr
if (projectPart->id() != m_projectPart->id()) {
ipcCommunicator.unregisterTranslationUnitsForEditor({fileContainerWithArguments()});
ipcCommunicator.registerTranslationUnitsForEditor({fileContainerWithArguments(projectPart)});
ipcCommunicator.updateTranslationUnitVisiblity();
requestDocumentAnnotations(projectPart->id());
}
} else {
ipcCommunicator.registerTranslationUnitsForEditor({{fileContainerWithArguments(projectPart)}});
ipcCommunicator.updateTranslationUnitVisiblity();
requestDocumentAnnotations(projectPart->id());
}
}