String (Project project, String sourceEditorText, @NotNull Function<? super DocumentationComponent, String> componentEvaluator) { int caretPosition = sourceEditorText.indexOf(EditorTestUtil.CARET_TAG); if (caretPosition >= 0) { sourceEditorText = sourceEditorText.substring(0, caretPosition) + sourceEditorText.substring(caretPosition + EditorTestUtil.CARET_TAG.length()); } PsiFile psiFile = PsiFileFactory.getInstance(project).createFileFromText(JavaLanguage.INSTANCE, sourceEditorText); return getDocumentationText(psiFile, caretPosition, componentEvaluator); }