开发者

Eclipse, packages disappaeared?

I rarely use complex IDEs (I favor simple editors and command-line tools) and my struggles with Eclipse have finally driven me into a corner I can't get out of. I don't even understand what happened, so I'll provide what details I feel are relevant -- feel free to ignore, or ask for more.

I installed Maven management for a Java project through m2eclipse, downloaded the indexes, installed some dependenc开发者_运维技巧ies manually editing the pom, and...

... the package tree dissappeard from the left pane. The folders are still there, I can open all the files and edit them; the JRE library node is there, the Maven node is there, everything but the classical package/class tree.

I can still work by going through the folders, I guess, but many of the tools Eclipse provides (e.g. refactoring) are not available.

Help would be most appreciated!


It seems, that the folders are not configured as source folders. Do you have the appropriate Maven folder structure, e.g. src/main/java, src/main/resources etc.? If so, then right click on the project and select "Update Project configuration" in the "Maven" sub menu. Then the project structure should be correct.


Make sure that all the source folders in under /src. The main doubt I have is you have probably messed up or worst, deleted some config file, either Maven specific (which I don't know) or eclipse specific. Note that there are many hidden/non-hidden files which are created by eclipse.

Also, try refreshing project and restarting the IDE. Seems trivial but sometimes works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜