views:

126

answers:

3

Is there a way to visually separate an inherited class member, i.e. a variable that is defined public/protected in a superclass?

I noticed that it's possible to stylize abstract members separately...

I'm using Eclipse Ganymede.

A: 
VonC
+2  A: 

Open Window > Preferences.

Select General > Appearence > Colors and Fonts on the left.

On the right select Java > Inherited Members, and choose color you want.

This color will be used in hierarchy view for inherited members.

Is there a way to do this to highlight the code in the editor?
Henrik Paul
I'm not aware of how to do that.
A: 

If you are talking about the editor, then you probably mean overridden methods (not inherited), right? If so, Eclipse indicates overridden methods in the editor with a green arrow pointing up to the left of the method signature. Clicking on the green arrow takes you to the super-classes implementation of the method.

As for actually changing the color of the text, I don't know - the green arrow has always been enough for me.

Kevin Day
No, I mean inherited, protected or public, class variables. So, if I use a protected variable from the superclass, I would instantly know that I don't need to look for a definition of that variable in the current class definition.
Henrik Paul