Document (@NotNull Project project, @NotNull XExpression expression, @Nullable PsiElement context, @NotNull EvaluationMode mode) { PsiFile codeFragment; try (AccessToken ignore = SlowOperations.knownIssue("IDEA-304707, EA-597817, EA-832153, ...")) { codeFragment = createExpressionCodeFragment(project, expression, context, true); } Document document = codeFragment.getViewProvider().getDocument(); assert document != null; return document; }