mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 01:57:50 +07:00
optimization
This commit is contained in:
@@ -84,13 +84,15 @@ class AnchorElementInfo extends SelfElementInfo {
|
||||
|
||||
@Override
|
||||
public void fastenBelt(int offset) {
|
||||
PsiElement element = restoreElement();
|
||||
if (element != null) {
|
||||
// switch to tree
|
||||
stubId = -1;
|
||||
myStubElementType = null;
|
||||
PsiElement anchor = AnchorElementInfoFactory.getAnchor(element);
|
||||
setRange((anchor == null ? element : anchor).getTextRange());
|
||||
if (stubId != -1) {
|
||||
PsiElement element = restoreElement();
|
||||
if (element != null) {
|
||||
// switch to tree
|
||||
stubId = -1;
|
||||
myStubElementType = null;
|
||||
PsiElement anchor = AnchorElementInfoFactory.getAnchor(element);
|
||||
setRange((anchor == null ? element : anchor).getTextRange());
|
||||
}
|
||||
}
|
||||
super.fastenBelt(offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user