简体   繁体   English

Spring教程:Eclipse Mars中的包浏览器视图中隐藏的文件夹

[英]Spring Tutorial: Folders hidden in package explorer view in Eclipse Mars

I'm following the Spring consuming REST API tutorial: http://spring.io/guides/gs/rest-service/ 我正在关注使用Spring的REST API教程: http : //spring.io/guides/gs/rest-service/

After git cloning gs-rest-service/initial project, I imported this project as an existing project in Spring Tool Suite. 在git克隆gs-rest-service / initial项目之后,我将该项目作为Spring Tool Suite中的现有项目导入。

However in the Package Explorer View, I don't see any folders in src/main, however in the hard drive, and when I try to create a new folder I do see these folders: java/hello again. 但是,在Package Explorer视图中,在src / main中没有看到任何文件夹,但是在硬盘驱动器中却没有看到任何文件夹,并且当我尝试创建新文件夹时,确实看到了以下文件夹: java/hello How do I make these folders appear in the Package Explorer Sidebar in Eclipse? 如何使这些文件夹出现在Eclipse的Package Explorer侧栏中?

[ [ 在此处输入图片说明 ] [ ] [ 在此处输入图片说明 ] 2 ] 2

Is your package empty ? 您的包裹是空的吗?

Have you refreshed your workspace ? 您是否刷新了工作区?

Check that under your 'Java Element Filters' you don't have 'empty packages' checked ? 检查“ Java元素过滤器”下是否没有选中“空包”?

Package Explorer is a virtual view of your project, so what you're seeing is that virtual representation has "relocated" Java sources to a virtual folder in that view. Package Explorer是项目的虚拟视图,因此您看到的是虚拟表示已将Java源“重定位”到该视图中的虚拟文件夹中。 Package Explorer represents source locations (such as src/main/java ) as a package container instead of an ordinary folder. Package Explorer将源位置(例如src/main/java )表示为包容器而不是普通文件夹。 Look at the first node under the project; 查看项目下的第一个节点; it has a different icon and is labeled src/main/java - that's where the source files are presented. 它有一个不同的图标,并标记为src/main/java在此处显示源文件。

在此处输入图片说明

If you want a more literal file-system view, open the Navigator view. 如果需要更文字的文件系统视图,请打开“导航器”视图。 Also look at Project Explorer, which shows both the literal view and the "virtual" view that Package Explorer shows. 还要查看Project Explorer,它同时显示Package Explorer显示的文字视图和“虚拟”视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM