IJPL-149317 Disable Write Intent Lock for runnables executed on EDT

Add WriteIntentReadAction as later a sync VFS task will be called.

GitOrigin-RevId: 2bad2d9930ef074c7b71e34f47b9c81e33a72672
This commit is contained in:
Lev Serebryakov
2024-05-31 21:09:19 +02:00
committed by intellij-monorepo-bot
parent 5d6718efa3
commit 12048bbcf2

View File

@@ -28,6 +28,7 @@ import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.application.WriteIntentReadAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.progress.ProcessCanceledException;
@@ -300,8 +301,10 @@ public class SMTestRunnerResultsForm extends TestResultsPanel
myTotalTestCount - myStartedTestCount,
myIgnoredTestCount);
UIUtil.invokeLaterIfNeeded(() -> {
TestsUIUtil.notifyByBalloon(myProperties.getProject(), testsRoot, myProperties, presentation);
addToHistory(testsRoot, myProperties, this);
WriteIntentReadAction.run((Runnable)() -> {
TestsUIUtil.notifyByBalloon(myProperties.getProject(), testsRoot, myProperties, presentation);
addToHistory(testsRoot, myProperties, this);
});
});
}