Document (@NotNull Project project, @NotNull XExpression expression, @Nullable XSourcePosition sourcePosition, @NotNull EvaluationMode mode) { PsiElement context = null; if (sourcePosition != null) { context = getContextElement(sourcePosition.getFile(), sourcePosition.getOffset(), project); } return createDocument(project, expression, context, mode); }