mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
textContains(char c) method optimization
This commit is contained in:
@@ -155,7 +155,12 @@ public class CompositeElement extends TreeElement implements Cloneable {
|
||||
}
|
||||
|
||||
public boolean textContains(char c) {
|
||||
return getText().indexOf(c) >= 0;
|
||||
synchronized (PsiLock.LOCK) {
|
||||
for (ASTNode child = getFirstChildNode(); child != null; child = child.getTreeNext()) {
|
||||
if (child.textContains(c)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final PsiElement findChildByRoleAsPsiElement(int role) {
|
||||
|
||||
Reference in New Issue
Block a user