mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
Java: remove workaround hack now that UAST supports resource expressions (IJ-CR-119831)
GitOrigin-RevId: 803dadd65b91ac5c0c4ab9ad7aeef2c5c6ab3d5a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
49d54776ac
commit
9bcb2a6194
@@ -189,27 +189,6 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visitTryExpression(@NotNull UTryExpression node) {
|
||||
// hack to workaround the problem that UAST does not support resource expressions IDEA-337821
|
||||
PsiTryStatement tryStatement = (PsiTryStatement)node.getJavaPsi();
|
||||
if (tryStatement != null) {
|
||||
PsiResourceList resourceList = tryStatement.getResourceList();
|
||||
if (resourceList != null) {
|
||||
for (PsiResourceListElement resourceListElement : resourceList) {
|
||||
if (resourceListElement instanceof PsiResourceExpression rExpression) {
|
||||
PsiExpression expression = rExpression.getExpression();
|
||||
UElement uElement = UastContextKt.toUElement(expression);
|
||||
if (uElement instanceof UExpression exp) {
|
||||
exp.accept(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void visitReferenceExpression(@NotNull UExpression node) {
|
||||
UElement uastParent = node.getUastParent();
|
||||
if (uastParent instanceof UQualifiedReferenceExpression qualifiedReference && qualifiedReference.getSelector() == node) {
|
||||
|
||||
Reference in New Issue
Block a user