Bug 379357

Summary: [quick fix] Infer type of incomplete field declaration
Product: [Eclipse Project] JDT Reporter: Marco Ippolito <maroloccio>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: marcel.bruch, markus.kell.r
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 379389    
Bug Blocks:    

Description Marco Ippolito CLA 2012-05-13 11:28:56 EDT
Build Identifier: M20120208-0800

On a line such as this:

    private static final MAXIM = "Life is tough";

the editor underlines the keyword "final" but is not able to recommend any "quick fix", just displaying "No suggestions available".

At least for String literals in a seemingly obvious constant declaration, I think we should be able to suggest adding "String' as a type to complete the declaration correctly.

Reproducible: Always

Steps to Reproduce:
1. Enter this line in a Java editor: private static final MAXIM = "Life is tough";
2. Request "quick fix" suggestions.
Comment 1 Markus Keller CLA 2012-05-14 05:59:14 EDT
Need AST support for this, filed bug 379389.