Object (@NotNull final Object pointer) { if (pointer instanceof SmartPsiElementPointer) { return ReadAction.compute(() -> ((SmartPsiElementPointer<?>)pointer).getElement()); } return super.retrieveElement(pointer); }