mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move executeSave to SaveExecutor as it is more suitable place now
This commit is contained in:
@@ -535,19 +535,6 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
override fun toString() = storageManager.componentManager.toString()
|
||||
}
|
||||
|
||||
internal fun executeSave(session: SaveSession, readonlyFiles: MutableList<SaveSessionAndFile>, errors: MutableList<Throwable>) {
|
||||
try {
|
||||
session.save()
|
||||
}
|
||||
catch (e: ReadOnlyModificationException) {
|
||||
LOG.warn(e)
|
||||
readonlyFiles.add(SaveSessionAndFile(e.session ?: session, e.file))
|
||||
}
|
||||
catch (e: Exception) {
|
||||
errors.add(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun findNonDeprecated(storages: Array<Storage>) = storages.firstOrNull { !it.deprecated } ?: throw AssertionError(
|
||||
"All storages are deprecated")
|
||||
|
||||
|
||||
@@ -37,4 +37,17 @@ internal open class SaveSessionProducerManager : SaveExecutor {
|
||||
}
|
||||
return isChanged
|
||||
}
|
||||
}
|
||||
|
||||
internal fun executeSave(session: SaveSession, readonlyFiles: MutableList<SaveSessionAndFile>, errors: MutableList<Throwable>) {
|
||||
try {
|
||||
session.save()
|
||||
}
|
||||
catch (e: ReadOnlyModificationException) {
|
||||
LOG.warn(e)
|
||||
readonlyFiles.add(SaveSessionAndFile(e.session ?: session, e.file))
|
||||
}
|
||||
catch (e: Exception) {
|
||||
errors.add(e)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user