14

Gonna keep this one short. Is there any way to click on the name of a class in the editor and see a list of all of its methods (inherited and otherwise) in another window?

This relates to my other question here: https://stackoverflow.com/questions/4457751/drag-and-drop-with-andengine-android, where I'm afraid I am overlooking a useful method.

Many thanks in advance for any help.

-Justian M.

Community
  • 1
  • 1
Justian Meyer
  • 3,623
  • 9
  • 35
  • 53

5 Answers5

39

You can use ctrl+O in the target class and when you want to see its inherited methods/members you have to again press ctrl+O (two times ctrl+O). This will work for both source files and class files

Pakka Techie
  • 682
  • 5
  • 6
18

Press F4 to open a 'Type hierarchy view'. Alternatively, right-click in the editor and select the option 'Open type hierarchy' from the context menu. Then, in this view, find a button with a tooltip 'Show all inherited members' (it's the second one in the row with the currently selected class name in it). This will show you all inherited members of the class that is currently selected in the Type hierarchy view.
If you click the right-most button in the same row (the green circle), you will only see public members. Of course, it would be great if there was an option to see only non-private members, however, I haven't found such an option.
Still, the ability to see all the inherited members is probably good enough?

Sandman
  • 9,610
  • 8
  • 36
  • 41
3

Just pressing ctrl+space in the class [outside any method] would show you all the methods that are not overriden but available from the parent class. You can see methods right upto the Object class. Hope that helps.

Pavan
  • 31
  • 1
2

When you open a class in Eclipse, the left hand gutter for the edit window (the same area that has the breakpoint indicators) has a small up arrow if that method implements or overrides behaviour from an interface or parent class. Is this what you're asking? If you open the Outline view you can also see the up arrow and this may make it easier to see the list of methods.

David O'Meara
  • 2,983
  • 25
  • 38
  • 1
    This is useful, yes, but I can only see the methods that are used or re-written in the class. It doesn't include the methods that I am not currently using. The purpose for me having this simple list is so I don't have to go down 10 classes to find 1 method that may provide the functionality I need. – Justian Meyer Dec 16 '10 at 06:05
  • 1
    @Justian Meyer - right click the class's edit window, select "Source" (or alt-shift S) then "Implement/Generate methods" will show a list of methods that are able to be overridden sorted by the parent class heirarchy. – David O'Meara Dec 16 '10 at 06:08
0

Please use ctrl+o short cut to get all the methods used in that class.

kandarp
  • 4,979
  • 11
  • 34
  • 43
  • Not quite what I'm talking about. Let's say I right click "Sprite", a class, in the editor window is there anything that I can open that shows me every possible method available to me, all the way down to the object class? – Justian Meyer Dec 16 '10 at 06:24
  • Just realized how stupid I was being. I can just type "[Class]." to see a list of suggested methods. – Justian Meyer Dec 16 '10 at 06:25