anonymous->inner: trim containing class name, skip Object in new name suggestions

This commit is contained in:
anna
2012-09-21 16:50:11 +02:00
parent 17284cb144
commit e3a545b2d0
@@ -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 {