mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PropertyFoldingBuilder: avoid SOE
This commit is contained in:
+2
-2
@@ -62,7 +62,7 @@ public class PropertyFoldingBuilder extends FoldingBuilderEx {
|
||||
final List<FoldingDescriptor> result = new ArrayList<>();
|
||||
boolean hasJsp = ContainerUtil.intersects(Arrays.asList(StdLanguages.JSP, StdLanguages.JSPX), file.getViewProvider().getLanguages());
|
||||
//hack here because JspFile PSI elements are not threaded correctly via nextSibling/prevSibling
|
||||
file.accept(hasJsp ? new JavaRecursiveElementVisitor() {
|
||||
file.accept(hasJsp ? new JavaRecursiveElementWalkingVisitor() {
|
||||
@Override
|
||||
public void visitLiteralExpression(PsiLiteralExpression expression) {
|
||||
ULiteralExpression uLiteralExpression = UastContextKt.toUElement(expression, ULiteralExpression.class);
|
||||
@@ -70,7 +70,7 @@ public class PropertyFoldingBuilder extends FoldingBuilderEx {
|
||||
checkLiteral(uLiteralExpression, result);
|
||||
}
|
||||
}
|
||||
} : new PsiRecursiveElementVisitor() {
|
||||
} : new PsiRecursiveElementWalkingVisitor() {
|
||||
|
||||
@Override
|
||||
public void visitElement(PsiElement element) {
|
||||
|
||||
Reference in New Issue
Block a user