mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-382130 [java] T: Do not use walking visitor inside compiled PSI
GitOrigin-RevId: de9712f8f12f23256b25c3e8a638a1c5956b2877
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a46470eb3d
commit
06b7118c04
@@ -13,6 +13,7 @@ import com.intellij.openapi.util.Predicates;
|
||||
import com.intellij.psi.JavaRecursiveElementWalkingVisitor;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiClassOwner;
|
||||
import com.intellij.psi.PsiCompiledElement;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiField;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -117,6 +118,7 @@ public class SafeDeleteFix extends LocalQuickFixAndIntentionActionOnPsiElement {
|
||||
|
||||
public static @NotNull List<PsiElement> computeReferencedCodeSafeToDelete(@Nullable PsiMember psiMember,
|
||||
@NotNull Predicate<? super PsiElement> additionalFilter) {
|
||||
if (psiMember instanceof PsiCompiledElement) return Collections.emptyList();
|
||||
final PsiElement body;
|
||||
if (psiMember instanceof PsiMethod method) {
|
||||
body = method.getBody();
|
||||
|
||||
Reference in New Issue
Block a user