Summary: | Preferences->Java Compiler-> Errors/Warnings -> Unqualified access to instance field: Not for inner classes | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Daniel Holmes <dholmes> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | markus.kell.r, Olivier_Thomann |
Version: | 3.5.2 | ||
Target Milestone: | 3.7 M1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Daniel Holmes
2010-07-13 11:33:47 EDT
Markus, would you support this in the UI if done ? I wouldn't do that. We already have too many preferences, and it's hard to justify that having "this." everywhere is acceptable but "OuterType.this" is too long. If you need the qualifier to make sure that you don't confuse fields with local variables, then this is even more important in inner types (where the fields and variables can even come from multiple enclosing methods & types). If you're compiling against 1.5 or higher, you can use the quick fix to add @SuppressWarnings("unqualified-field-access") to inner types. And I'm sure you know about the "Java > Editor > Syntax Coloring" and "Java > Code Style" preferences (e.g. an "f" prefix for fields saves a lot of characters). That's fair. I wanted to submit my team's feedback to my suggesting that we enable this check and see what you guys thought. Then closing as WONTFIX. Core won't provide an option if it doesn't show up in the UI. |