Reputation: 18423
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 view menu to show me everything possible but still nothing.
If I right click in the class editor and select Quick Outline
I get the info that used to appear in the Outline
view. What gives?!
Any help?
Thanks
EDIT: i now just use IntelliJ!
Upvotes: 15
Views: 40746
Reputation: 14980
Apparently the reason for this problem is that the DLTK (Dynamic Languages ToolKit) index is broken.
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.
Upvotes: 9
Reputation: 11
I recently experienced this issue. In Window > Show View > Outline I had the message "There is no active editor that provides an outline."
It used to be working fine and I am not really sure what happened/I did to break it. I checked my other projects and they did not have any issues with outline view. After trying many of the solutions suggested here I ended up creating a new workspace and importing my project again just to have a clean slate. Now I have the outline view.
Upvotes: 1
Reputation: 1
This works in my case:
Good luck!
Upvotes: 0
Reputation: 83
I had the same issue with eclipse oxygen today and the reason was the missing scala library in the scala project. the problem is reported in the eclipse problems tab: "Unable to find a scala library. Please add the scala container or a scala library jar to the build path."
The solution for me, that let the outline to be filled as well, has been:
Upvotes: 0
Reputation: 1127
I had the same issue where the Outline was empty and the code was not syntax-highlighted.
To fix it, I right-clicked the file and selected Open With>Java Editor.
For some reason, Eclipse thought that it should open this particular .java file with the Text Editor instead of the Java Editor.
Upvotes: 7
Reputation: 1015
If the Java file/files does not show in the outline
move the file out elsewhere
do a refresh
move back the file
do a refresh again
the outline will be populated again
Upvotes: 0
Reputation: 2346
With Javascript (Rhino) code I had the problem when I used const
variables.
As soon as I changed them to var
variables, the outline appeared again.
Upvotes: 0
Reputation: 41
In Window>Show View>Outline I, too, had the message "Outline view is empty". It was sufficient (Eclipse 4.3.2) to press CTL+O to call the QuickOutline and then the Outline view was filled automatically. I suggest not deleting .metadata because you need it :-)
Upvotes: 3
Reputation: 390
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.
Upvotes: 0
Reputation: 2689
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.
Upvotes: 0
Reputation: 1
The same problem, Kepler Service Release 1, PDT 3.2.0.
Solution: I deleted the whole content of the class and saved file. Outline started. I restored content of the class and outline is OK.
Upvotes: 0
Reputation: 93
I got the similar problem in PDT. Click the Outline view, but no response. Ctrl + O
(Quick View) works. But the options (drop down-menu Filters) in outline view is also missing.
I tried to delete DLTK h2 database (*.db) files, but it doesn't work in my case.
Finally, I solved by below methods:
Method 1: As suggested, delete the whole .metadata folder (but lose all setting).
Method 2: Create new Window in Eclipse (Window
> New Window
).
Upvotes: 0
Reputation: 6203
I had the problem with my Eclipse PDT 3.2.0 and I fixed it by correcting something that apparently threw off the content parser. How I found it:
I ended up basically deleting line after line until I ended up looking at something funny:
throw(new Something_Exception($msg));
When I deleted the outer parens (on all three occurrences of this), the outline came back to life.
Upvotes: 0
Reputation: 167
If you don't want to delete all your perfs, here's my solution:
close eclipse
open the file at path:
workspace\.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.jsp.ui.prefs
outline
and delete those lines.Upvotes: 1
Reputation: 41
I solved this by navigating to /workspace/.metadata/.plugins/org.eclipse.cdt.core
and deleting the .pdom file that corresponds to my project
Upvotes: 4
Reputation: 18423
I solved this in the end by just deleting my Workspaces .metadata folder (rm -rf .metadata
OSX). I lost any workspace settings but this for was a few formatting rules, refs to projects (just imported them again) and some custom key shortcuts.
My outline works again!
Upvotes: 5
Reputation: 21411
A couple of ideas:
Link with Editor
button on the Outline view to ensure the view reflects the currently open Java file?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..java
file extension?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.Upvotes: 3