IntentionPreviewInfo (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { PsiElement element = PsiTreeUtil.findSameElementInCopy(myStartElement.getElement(), file); if (element == null) return IntentionPreviewInfo.EMPTY; RefactoringActionHandler handler = LanguageRefactoringSupport.INSTANCE.forLanguage(JavaLanguage.INSTANCE).getIntroduceVariableHandler(); assert handler != null; if (handler instanceof PreviewableRefactoringActionHandler previewableRefactoringActionHandler) { return previewableRefactoringActionHandler.generatePreview(project, element); } return IntentionPreviewInfo.EMPTY; }