IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { PsiElement elementToRefactor = getElementToRefactor(previewDescriptor.getPsiElement()); if (elementToRefactor instanceof PsiClass aClass && aClass.getParent() instanceof PsiClass) { String className = aClass.getName(); String key = aClass.hasModifierProperty(PsiModifier.STATIC) ? "move.inner.class.to.upper.level.or.another.class.preview" : "move.inner.class.to.upper.level.preview"; return new IntentionPreviewInfo.Html(JavaRefactoringBundle.message(key, className)); } return IntentionPreviewInfo.EMPTY; }