IDEA-173726 Generation completion suggests create setter for final field

This commit is contained in:
peter
2017-06-09 15:41:32 +02:00
parent 53345989ea
commit 1a4a90e174
3 changed files with 14 additions and 1 deletions
@@ -93,7 +93,9 @@ public class JavaGenerateMemberCompletionContributor {
List<PsiMethod> prototypes = ContainerUtil.newSmartList();
try {
Collections.addAll(prototypes, GetterSetterPrototypeProvider.generateGetterSetters(field, true, false));
Collections.addAll(prototypes, GetterSetterPrototypeProvider.generateGetterSetters(field, false, false));
if (!field.hasModifierProperty(PsiModifier.FINAL)) {
Collections.addAll(prototypes, GetterSetterPrototypeProvider.generateGetterSetters(field, false, false));
}
}
catch (GenerateCodeException ignore) { }
for (final PsiMethod prototype : prototypes) {