mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not retrieve element when pointer is sufficient
This commit is contained in:
@@ -87,6 +87,13 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement
|
||||
if (myIsDeleted) return false;
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
public Boolean compute() {
|
||||
|
||||
final PsiFile file = myID.getContainingFile();
|
||||
//no need to check resolve in offline mode
|
||||
if (ApplicationManager.getApplication().isHeadlessEnvironment()) {
|
||||
return file != null && file.isPhysical();
|
||||
}
|
||||
|
||||
final PsiElement element = getElement();
|
||||
return element != null && element.isPhysical();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user