mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
anonymous->inner: trim containing class name, skip Object in new name suggestions
This commit is contained in:
+2
-1
@@ -91,10 +91,11 @@ class AnonymousToInnerDialog extends DialogWrapper{
|
||||
if (psiType instanceof PsiClassType) {
|
||||
type = TypeConversionUtil.erasure(psiType);
|
||||
}
|
||||
if (type == null || type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) return "";
|
||||
if (type instanceof PsiArrayType) {
|
||||
type = type.getDeepComponentType();
|
||||
}
|
||||
return type.getPresentableText();
|
||||
return StringUtil.getShortName(type.getPresentableText());
|
||||
}
|
||||
}, "") + name, "My" + name};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user