Eclipse,包消失了?
我很少使用复杂的 IDE(我更喜欢简单的编辑器和命令行工具),而我与 Eclipse 的斗争最终让我陷入了无法摆脱的困境。我什至不明白发生了什么,所以我将提供我认为相关的细节 - 请随意忽略,或要求更多。
我通过 m2eclipse 为 Java 项目安装了 Maven 管理,下载了索引,安装了一些依赖项,手动编辑 pom
,然后……
包树从左侧窗格中消失了。文件夹仍然存在,我可以打开所有文件并编辑它们; JRE 库节点在那里,Maven 节点在那里,除了经典的包/类树之外的所有东西。
我猜我仍然可以通过浏览文件夹来工作,但是 Eclipse 提供的许多工具(例如重构)不可用。
非常感谢您的帮助!
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 dependencies 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些文件夹似乎未配置为源文件夹。您是否有适当的 Maven 文件夹结构,例如 src/main/java、src/main/resources 等?如果是这样,则右键单击该项目并在“Maven”子菜单中选择“更新项目配置”。那么项目结构应该是正确的。
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.
确保所有源文件夹都位于 /src 下。
我的主要疑问是你可能搞砸了或者最糟糕的是,删除了一些配置文件,无论是 Maven 特定的(我不知道)还是 Eclipse 特定的。请注意,有许多由 eclipse 创建的隐藏/非隐藏文件。
另外,尝试刷新项目并重新启动 IDE。看似微不足道,但有时确实有效。
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.