mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable inline to anonymous om constructors if inheritors are found (IDEA-53344)
This commit is contained in:
+2
-1
@@ -55,7 +55,8 @@ public class InlineToAnonymousClassHandler extends JavaInlineActionHandler {
|
||||
if (element instanceof PsiMethod) {
|
||||
PsiMethod method = (PsiMethod)element;
|
||||
if (method.isConstructor() && !InlineMethodHandler.isChainingConstructor(method)) {
|
||||
return true;
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
return containingClass != null && ClassInheritorsSearch.search(containingClass).findAll().size() == 0;
|
||||
}
|
||||
}
|
||||
if (!(element instanceof PsiClass)) return false;
|
||||
|
||||
Reference in New Issue
Block a user