Save change script configuration within a transaction
#EA-214281 Fixed
This commit is contained in:
@@ -38,7 +38,7 @@ internal class ScriptClassRootsManager(val project: Project) {
|
||||
}
|
||||
|
||||
private fun checkInTransaction() {
|
||||
check(concurrentTransactions.get() > 0)
|
||||
check(concurrentTransactions.get() > 0) { "Transaction is not started" }
|
||||
}
|
||||
|
||||
inline fun transaction(body: () -> Unit) {
|
||||
|
||||
+3
-1
@@ -236,7 +236,9 @@ class ScriptConfigurationManagerImpl internal constructor(private val project: P
|
||||
if (oldConfiguration != null) {
|
||||
file.removeScriptDependenciesNotificationPanel(project)
|
||||
}
|
||||
saveChangedConfiguration(file, newConfiguration, skipSaveToAttributes)
|
||||
rootsManager.transaction {
|
||||
saveChangedConfiguration(file, newConfiguration, skipSaveToAttributes)
|
||||
}
|
||||
} else {
|
||||
debug(file) {
|
||||
"configuration changed, notification is shown: old = $oldConfiguration, new = $newConfiguration"
|
||||
|
||||
Reference in New Issue
Block a user