[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jdt-core-dev] Field references
|
Right now, you can search for field references in 3 ways:
- IJavaSearchConstants.REFERENCES: all references to a field are reported
(this does not include field declarations)
- IJavaSearchConstants.READ_REFERENCES: all read references to a field are
reported (this does not include field declarations, or field
modifications)
- IJavaSearchConstants.WRITE_REFERENCES: all write references to a field are
reported (this does not include field declarations - even if the field has
an initializer)
However, bug 5563: 'Write reference on declaration not reported' made us realize that what you really want in the 3rd case is the field
modifications (including field initializations). In this case, the
following implicit rule REFERENCES = READ_REFERENCES + WRITE_REFERENCES
is false.
I propose to change the last 2 constants to:
- IJavaSearchConstants.READ_ONLY: all read access to a field are reported
(this does not include field declarations, or field modifications)
- IJavaSearchConstants.MODIFICATIONS: all field modifications (including
initializations) to a field are reported.
And the implicit rule disappears because there is no notion of reference
in this last 2 constants.
The Java Search page would have to be modified accordingly.
Comments are welcome (please respond to jdt-core-dev@xxxxxxxxxxx).
Jerome