mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
fix "read action required" exception
GitOrigin-RevId: e9d4e12d7cc3813f3948768d176677085dd6fc06
This commit is contained in:
committed by
intellij-monorepo-bot
parent
30f8be6c4b
commit
cbf42c105d
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.daemon.impl;
|
||||
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -12,6 +13,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
record InvalidPsi(@NotNull PsiElement psiElement, @NotNull HighlightInfo info) {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InvalidPsi("+psiElement()+(psiElement().isValid() ? "" : "(invalid)")+","+info+")";
|
||||
return ReadAction.compute(() -> "InvalidPsi(" + psiElement() + (psiElement().isValid() ? "" : "(invalid)") + "," + info + ")");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user