From cac72a298a5af535ce4fda310f51ab4fc19e757a Mon Sep 17 00:00:00 2001 From: Konstantin Nisht Date: Wed, 3 Dec 2025 17:10:53 +0100 Subject: [PATCH] [threading] IJPL-221338: Restore read access in InplaceIntroduceConstantPopup GitOrigin-RevId: 59ad8a868137ea658e47056f7b1ce79c03f950a9 --- .../introduceField/InplaceIntroduceConstantPopup.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/java-impl-refactorings/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java b/java/java-impl-refactorings/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java index dc1278e78b64..86e563cd2120 100644 --- a/java/java-impl-refactorings/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java +++ b/java/java-impl-refactorings/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java @@ -1,10 +1,11 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.refactoring.introduceField; import com.intellij.codeInsight.TargetElementUtil; import com.intellij.java.refactoring.JavaRefactoringBundle; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.WriteAction; +import com.intellij.openapi.application.WriteIntentReadAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; @@ -257,7 +258,9 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField myReplaceAllCb.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - restartInplaceIntroduceTemplate(); + WriteIntentReadAction.run(() -> + restartInplaceIntroduceTemplate() + ); } });