introduce parameter: when initial names are suggested type selector is not initialized yet and selected type is always null, default type would be better

This commit is contained in:
Anna Kozlova
2015-02-17 14:58:55 +01:00
parent 8d9b9364a2
commit e294ec2192
@@ -50,7 +50,7 @@ public abstract class AbstractJavaInplaceIntroducer extends AbstractInplaceIntro
@Override
protected String[] suggestNames(boolean replaceAll, PsiVariable variable) {
final PsiType defaultType = myTypeSelectorManager.getTypeSelector().getSelectedType();
final PsiType defaultType = getType();
final String propertyName = variable != null
? JavaCodeStyleManager.getInstance(myProject).variableNameToPropertyName(variable.getName(), VariableKind.LOCAL_VARIABLE)
: null;