Project: JDT
Bug 362496 [quick assist][nls tooling] IAE in new 'Create field...' quick assist in properties editor
Reported: 2011-10-31 10:48:00 | Status: verified fixed

If a property is not a valid java identifier the following exception is thrown on invoking the quick assist. java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:198) at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:2031) at org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassModifier.getNewFinalStringFieldDeclaration(AccessorClassModifier.java:331) at org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassModifier.addKey(AccessorClassModifier.java:291) at org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassModifier.addKey(AccessorClassModifier.java:282) at org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassModifier.addFields(AccessorClassModifier.java:191) at org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesQuickAssistProcessor.getCreateFieldsInAccessorClassProposals(PropertiesQuickAssistProcessor.java:188) at org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesQuickAssistProcessor.collectAssists(PropertiesQuickAssistProcessor.java:87) at org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesCorrectionProcessor.computeQuickAssistProposals(PropertiesCorrectionProcessor.java:8

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesQuickAssistProcessor.java