mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
IJPL-149317 Disable Write Intent Lock for runnables executed on EDT
Add explicit locks in notebooks. GitOrigin-RevId: fcfeaec82a755780c3911edba7af337cad3aadf4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6a55365287
commit
7b7a1769e0
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.plugins.notebooks.visualization.ui
|
||||
|
||||
import com.intellij.ide.structureView.StructureViewBuilder
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.ReadAction
|
||||
import com.intellij.openapi.client.ClientSystemInfo
|
||||
import com.intellij.openapi.editor.Caret
|
||||
@@ -95,7 +96,7 @@ private class DecoratedEditor(private val original: TextEditor, private val mana
|
||||
|
||||
private fun scheduleSelectionUpdate() {
|
||||
if (selectionUpdateScheduled.compareAndSet(false, true)) {
|
||||
SwingUtilities.invokeLater {
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
try {
|
||||
updateSelectionByCarets()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.plugins.notebooks.visualization.ui
|
||||
|
||||
import com.intellij.openapi.application.ReadAction
|
||||
import com.intellij.openapi.application.WriteIntentReadAction
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.EditorKind
|
||||
import com.intellij.openapi.editor.Inlay
|
||||
@@ -57,7 +58,7 @@ fun EditorEx.addComponentInlay(
|
||||
private fun updateUiOnParentResizeImpl(parent: JComponent, childRef: WeakReference<JComponent>) {
|
||||
val listener = object : ComponentAdapter() {
|
||||
override fun componentResized(e: ComponentEvent?) {
|
||||
ReadAction.run<Throwable> {
|
||||
WriteIntentReadAction.run {
|
||||
val child = childRef.get()
|
||||
if (child != null) {
|
||||
child.updateUI()
|
||||
|
||||
Reference in New Issue
Block a user