Eclipse Outline View is empty

前端 未结 16 1008
轮回少年
轮回少年 2021-02-04 08:15

A simple one today. My Outline view in eclipse does not show me any methods or fields anymore. I have selected the few options that are available in the outline vie

相关标签:
16条回答
  • 2021-02-04 08:40

    A couple of ideas:

    • Have you clicked the Link with Editor button on the Outline view to ensure the view reflects the currently open Java file?
    • Is the java class in a source dir as per Eclipse? Right click on the project > Build path > Configure Build Path > Source tab: The package structure of your class should be under one of these source folders.
    • (a bit paranoid but just checking) Has your java class have the .java file extension?
    • Does the Outline view working in any other project?
    • Precaution measure: Restart Eclipse to see whether this changes anything.
    • If Ctrl + o (quick view) works then there must be something wrong with the Outline view itself: Double check in the drop down-menu Filters nothing is filtered out and same for the Visible Categories section.
    0 讨论(0)
  • 2021-02-04 08:41

    I had the same exact issue, however I am using MyEclipse. For me, simply restarting the IDE resolved the issue. Not sure what caused it, possibly switching perspectives? Anywho, just thought I'd throw this out there for informational purposes.

    0 讨论(0)
  • 2021-02-04 08:41

    If the Java file/files does not show in the outline

    1. move the file out elsewhere

    2. do a refresh

    3. move back the file

    4. do a refresh again

    the outline will be populated again

    0 讨论(0)
  • 2021-02-04 08:41

    This works in my case:

    1. Reinstall Eclipse.
    2. Help -> Eclipse Marketplace -> directly install the windows builder.
    3. Upgrade my JDK from version 11 to 15.

    Good luck!

    0 讨论(0)
  • 2021-02-04 08:43

    Tranz's response worked fine for me, even though the path to the file is slightly different (I am using Eclipse Luna):

    .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
    

    After deleting those lines and restarting Eclipse, the Outline works fine again.

    0 讨论(0)
  • 2021-02-04 08:46

    Apparently the reason for this problem is that the DLTK (Dynamic Languages ToolKit) index is borken.

    Following Five tips for speeding up Eclipse PDT and nWire, I have closed Eclipse, and only deleted the h2 database (*.db) files in <workspace>/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/.

    When restarting Eclipse, the databases files are created again, and after that the Outline View is working again. IIRC, this is the second time that I had this problem (first with Eclipse 3.7.x and now 4.2) and that this solution worked for me.

    0 讨论(0)
提交回复
热议问题