Reputation: 23
In Eclipse IDE, when I am within a class file, one of the class attributes is used in some methods of that class.
How can I quickly go to the declarations of the getter and setter for that attribute without scrolling through the whole class file?
Upvotes: 1
Views: 119
Reputation: 3691
Right click on the field > Open call hierachy
or select the field then CTRL+ALT+H
Another solution is to activate the Toggle mark occurences
option from the menu bar or ALT+SHIFT+O. That will put small marks on the right side of your window, next to the scroll bar. Note that will mark every use of the field in the file but it's not always easy to distinguish the marks from the research mark results and the other types of marks used by Eclipse (errors, warning, TODO, etc.)
Upvotes: 1
Reputation: 561
One way is a quick outline
ctrl+o (cmd+o)
or search via
ctrl + h
Upvotes: 1
Reputation: 7071
Ctrl + click on the field gets you to the declaration
Ctrl + O and you can start typing a method and go to it
Ctrl + g on the field finds where it is used and the getter/setter will be in the list
There might be other ways but a good source would be to read Eclipse Shortcuts and find the ones that suits your needs.
Upvotes: 1