Do not force FULL analysis for PARTIAL_FOR_COMPLETION for the current open file

Relates to #KT-38687
This commit is contained in:
Vladimir Dolzhenko
2020-07-02 11:26:15 +02:00
parent 51375ed278
commit 357746e344
@@ -162,7 +162,7 @@ class ResolveElementCache(
// neither result of PARTIAL nor result of PARTIAL_WITH_CFA analyses could be reused by FULL analysis. // neither result of PARTIAL nor result of PARTIAL_WITH_CFA analyses could be reused by FULL analysis.
// //
// Force perform FULL analysis to avoid redundant analysis for the current selected files. // Force perform FULL analysis to avoid redundant analysis for the current selected files.
if (bodyResolveMode != BodyResolveMode.FULL && (!isUnitTestMode() || forceFullAnalysisModeInTests)) { if (bodyResolveMode != BodyResolveMode.FULL && bodyResolveMode != BodyResolveMode.PARTIAL_FOR_COMPLETION && (!isUnitTestMode() || forceFullAnalysisModeInTests)) {
val virtualFile = resolveElement.containingFile.virtualFile val virtualFile = resolveElement.containingFile.virtualFile
// applicable for real (physical) files only // applicable for real (physical) files only
if (virtualFile != null && FileEditorManager.getInstance(resolveElement.project).selectedFiles.any { it == virtualFile }) { if (virtualFile != null && FileEditorManager.getInstance(resolveElement.project).selectedFiles.any { it == virtualFile }) {