Bug 323994 - [navigation] Let Mark Write Occurrences affect method declaration
Summary: [navigation] Let Mark Write Occurrences affect method declaration
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 12:37 EDT by Carl Manaster CLA
Modified: 2014-06-01 23:21 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Manaster CLA 2010-08-30 12:37:05 EDT
Build Identifier: 

If I color Occurrences red and Write Occurrences green, then where I am assigning a value to the highlighted variable, it is green and other places it is red.  I'd like the same behavior (-ish) with respect to methods: where I am calling the method, I'd like to see (say) red, but where it is defined, I'd like to see green.

Reproducible: Always

Steps to Reproduce:
1. Window > Preferences > General > Editors > Text Editors >  Annotations
2. Occurrences: RED; Write Occurrences: GREEN
3. click on a method name
Want method's declaration occurrence to be GREEN, but it's RED.
Comment 1 Markus Keller CLA 2010-08-31 10:58:14 EDT
It's not what you requested, but this might help in the meantime:
You can change the appearance of all method declarations globally on the Syntax Coloring preference page (e.g. make them bold).
Comment 2 Adtc Rulez CLA 2014-06-01 23:21:04 EDT
I would like to draw attention to this once again. It's nearing four years, and it's kinda bugging me why this is not implemented yet.

It's very useful to mark read occurrences and write occurrences of variable differently as I can quickly locate the write occurrences in the Overview Ruler and understand how the variable value is changing.

Borrowing from the same logic, I expected method declarations to be shown as a write occurrence to help me quickly locate it in the source code.

If the code has several method call occurrences, it will be helpful to quickly see where the method declaration is and roughly how many times it is called by looking at the Overview Ruler.

Currently, the only way to locate it is using "Open Declaration (F3)". It will be very handy to see the declaration highlighted differently, as I can simply click on the highlight in Overview Ruler to go to the method declaration in code. It would also help differentiate whether the method is declared in the same source code file (presence of the write occurrence in Overview Ruler) or in another file (absence of such).

Given that Open Declaration can already find where the method declaration is, and that Mark Occurrences can find both method declarations and method calls, I believe it shouldn't be too difficult to implement :)