Wednesday, March 23, 2011

Is there a way to remove private members from Content Assist in Eclipse

I'm in Eclipse writing Java. I come from Visual Studio with Resharper writing C#.

When Content Assist comes up, I see all the private members of a class, even though I'm not editing that class. Is there a way I can turn that off?

It's really distracting.

From stackoverflow
  • Window -> Preferences -> Java -> Editor ->Content Assist -> Hide proposals not visible in the invocation context

    ageektrapped : That doesn't seem to work for me. Others in the office said the same thing, and it works for them, but not for me.
    starblue : Strange. I've tested it before answering and it works for me, too (in Eclipse Ganymede).
  • If you do not explicitly write a method's access level (public, protected, or private), then it will default to package-private, and these methods will probably been shown in Content Assist.

0 comments:

Post a Comment