mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[DS-4896] add more ThreadingAssertions.assertWriteAccess() to NotebookIntervalPointerFactoryImpl
GitOrigin-RevId: e3b9cbedc3cd0146b8b77189b3e6e307b32d6913
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8ded962003
commit
3030aeadb3
@@ -74,7 +74,7 @@ class NotebookIntervalPointerFactoryImpl(private val notebookCellLines: Notebook
|
||||
get() = field?.takeIf { !project.isDisposed }
|
||||
|
||||
override fun create(interval: NotebookCellLines.Interval): NotebookIntervalPointer {
|
||||
ThreadingAssertions.softAssertReadAccess()
|
||||
ThreadingAssertions.assertReadAccess()
|
||||
return pointers[interval.ordinal].also {
|
||||
require(it.interval == interval)
|
||||
}
|
||||
@@ -90,12 +90,14 @@ class NotebookIntervalPointerFactoryImpl(private val notebookCellLines: Notebook
|
||||
|
||||
validUndoManager?.undoableActionPerformed(object : BasicUndoableAction(documentReference) {
|
||||
override fun undo() {
|
||||
ThreadingAssertions.assertWriteAccess()
|
||||
val invertedChanges = invertChanges(eventChanges)
|
||||
updatePointersByChanges(invertedChanges)
|
||||
onUpdated(NotebookIntervalPointersEvent(invertedChanges, cellLinesEvent = null, EventSource.UNDO_ACTION))
|
||||
}
|
||||
|
||||
override fun redo() {
|
||||
ThreadingAssertions.assertWriteAccess()
|
||||
updatePointersByChanges(eventChanges)
|
||||
onUpdated(NotebookIntervalPointersEvent(eventChanges, cellLinesEvent = null, EventSource.REDO_ACTION))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user