Scripts: clear manual configuration loading state after project import
^KT-35268
This commit is contained in:
@@ -175,6 +175,12 @@ interface ScriptConfigurationManager {
|
|||||||
(getInstance(project) as AbstractScriptConfigurationManager).clearCaches()
|
(getInstance(project) as AbstractScriptConfigurationManager).clearCaches()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun clearManualConfigurationLoadingIfNeeded(file: VirtualFile) {
|
||||||
|
if (file.LOAD_CONFIGURATION_MANUALLY == true) {
|
||||||
|
file.LOAD_CONFIGURATION_MANUALLY = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun markFileWithManualConfigurationLoading(file: VirtualFile) {
|
fun markFileWithManualConfigurationLoading(file: VirtualFile) {
|
||||||
file.LOAD_CONFIGURATION_MANUALLY = true
|
file.LOAD_CONFIGURATION_MANUALLY = true
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -69,6 +69,8 @@ class GradleScriptConfigurationLoader(project: Project) : DefaultScriptConfigura
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScriptConfigurationManager.clearManualConfigurationLoadingIfNeeded(vFile)
|
||||||
|
|
||||||
// Gradle read files from FS
|
// Gradle read files from FS
|
||||||
GlobalScope.launch(EDT(project)) {
|
GlobalScope.launch(EDT(project)) {
|
||||||
runWriteAction {
|
runWriteAction {
|
||||||
|
|||||||
Reference in New Issue
Block a user