Community
Participate
Working Groups
If I have a class with some fields, like this: public class Foo { private static final String _BLAH = "blah blah blah"; public static final int DEFAULT_NUM = 300; private final List<Integer> _values = new ArrayList<Integer>(); private int _currentVal = DEFAULT_NUM; } The Outline View currently displays these fields as just their name and type, like this: _BLAH : String DEFAULT_NUM : int _values : List<Integer> _currentVal : int I think it would be handy if it showed some information about the values initialised in the declaration, like this: _BLAH : String ["blah blah blah"] DEFAULT_NUM : int [300] _values : List<Integer> [ArrayList<Integer>] _currentVal : int [DEFAULT_NUM] To avoid making it look cluttered, perhaps the initial value information (shown in square brackets above) could be rendered in a grey font...?
Good idea. In most cases we could get the value from the AST.
Martin, does the AST only contain the const values or also the init values?
You can easely check with the ASTView. If you have the AST of the class containing the filed, then of course you can access any kind of initialzer. If you only have the field binding (what I guess you have), only static final have initialializers, and only if it is a literal. BTW, also IFields from the Java model give access to the const values .