30

When I want to see implementation of some interface through F4 (type hierarchy) or ctrl+t (quick hierarchy) or implementation of a method, I can't see it! Problem is, that it works in 90%, but I have few cases when interface and implementation are in same package and eclipse doesn't recognize it via type hierarchy. Any suggestions? Got Eclipse Indigo SR2.

Alex
  • 11,451
  • 6
  • 37
  • 52
Slimer
  • 1,123
  • 2
  • 10
  • 22
  • Can you provide a sample class structure that reliably fails in Eclipse? We could then test it. – Duncan Jones May 03 '13 at 08:02
  • Dose this apply to your own hierarchies only or to Java classes also? If the first: do you have any compiler errors in your code? Try re-building... – Kai May 03 '13 at 08:05
  • No errors in workspace..I can't certainly tell that the problem is only within my classes...as I said, it works in 90% maybe more, but I have 1 specified class that doesn't work anyhow. Also I need to tell, that my colleagues have no problems with this class. Its common interface nothing special. Also, when I'm in implementation, I can ctrl+click on method to redirect into interface without any problems, but when I check type hierarchy for implementation, the only super class I'm seeing is Object. – Slimer May 03 '13 at 09:26
  • I have the same problem. Probably is triggered (in my case) by computing hierarchy for a scala type. This corrupts the indexes. If I clean them up it works till I compute a hierarchy for one of my scala classes. I'm using `eclipse.buildId=4.5.0-vfinal-2016-12-13T10:59:29Z-Typesafe` – raisercostin Apr 17 '17 at 13:51

3 Answers3

54

I had this same problem and fixed it by deleting the Eclipse index cache files located in .metadata/.plugins/org.eclipse.jdt.core. Delete all .index files and savedIndexNames.txt. Do this while Eclipse is not running and then restart. This fixed the issue for me.

MattWallace
  • 1,015
  • 6
  • 12
1

Use Eclipse clean mode for deleting caches, look here: How to run eclipse in clean mode? and what happens if we do so?

Sometimes is good to use clean mode to prevent these types of problems.

Community
  • 1
  • 1
Pavel Coufal
  • 169
  • 1
  • 6
  • 1
    Worked for me on Neon Release (4.6.0). I ran in clean mode by adding -clean as first line of my eclipse.ini file. – el-teedee Jul 31 '17 at 10:04
-4

I also had this problem and fixed it. The reason of this problem is that when the eclipse is running, I reinstall the JDK from 1.8 to 1.6. So I close eclipse, install JDK 1.8 again, then it's OK! May it will be helpful for others.

zawdd
  • 311
  • 1
  • 3
  • 12