javaeclipsejavadoceclipse-juno

Why are duplicate method suggestions appearing in Eclipse?


Two contains(Object o) methods in eclipse

This problem also occurs with other methods but I am just using ArrayList.contains(Object o) as an example.

The method appears twice in Eclipse's method suggestions but one of them with a percentage. As far as I can tell it seems to be a percentage unique to that method.

The methods do the same thing as they both have the same name and parameters so I have no clue why this was happening.

I also though maybe it was some kind of progress counter for the completion of the method, but this makes no sense if there is one without the percentage there too.


Solution

  • You have Code Recommenders installed. The proposal with percentage is coming from that, and the proposal without the percentage is coming from JDT.

    Essentially there are more than one completion engines installed - see Preferences > Java > Editor > Content Assist. The same method is being offered by more than one engine. While this explains why the duplicates are there, I do not have a workaround or a solution in mind.