Bug 379357 - [quick fix] Infer type of incomplete field declaration
Summary: [quick fix] Infer type of incomplete field declaration
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 379389
Blocks:
  Show dependency tree
 
Reported: 2012-05-13 11:28 EDT by Marco Ippolito CLA
Modified: 2012-05-14 05:59 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.