For certain problems underlined with a problem highlight line, the Java editor can offer corrections. This is shown by the light bulb shown in the editor marker bar.
Note that the light bulb is only a hint. It is possible that even with the light bulb shown, it turns out that no corrections can be offered.
Provided corrections:
Problem |
Correction Proposals |
---|---|
Unresolved method reference |
|
Unresolved variable name |
|
Unresolved type name |
|
Undefined constructor |
|
Parameter mismatch |
|
Unhandled exception |
|
Type name does not match compilation unit name |
|
Package declaration does not match file location |
|
Unused import |
|
Type mismatch |
|
Unterminated string |
|
Non-Externalized string |
|
To enable / disable problem indication & the light bulb go to the Java Editor preference page > Annotations
Java editor
Java Development Tools (JDT)