在 Eclipse 的项目资源管理器中按类型排序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5352431/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sorting by type in Project Explorer in Eclipse?
提问by Jared Pearson
I recently upgraded to Helio SR2 and the sort order for the package explorer is now sorting by name no matter the type. Is there any way to specify the sort order?
我最近升级到 Helio SR2,并且无论类型如何,包资源管理器的排序顺序现在都按名称排序。有没有办法指定排序顺序?
Example
例子
- JAX-WS Web Service
- Deployment Descriptor
- Java Resources
- pom.xml (File)
- src (Folder)
- main (Folder)
- java (Folder)
- webapp (Folder)
- a.jsp (File)
- b (Folder)
- c.jsp (File)
- WEB-INF (Folder)
- z.jsp (File)
- JAX-WS 网络服务
- 部署描述符
- Java资源
- pom.xml(文件)
- src(文件夹)
- 主要(文件夹)
- java(文件夹)
- webapp(文件夹)
- a.jsp(文件)
- b(文件夹)
- c.jsp(文件)
- WEB-INF(文件夹)
- z.jsp(文件)
In the example above, the files and folders are not sorted by type and then sorted by name (like in Windows Explorer).
在上面的示例中,文件和文件夹不是按类型排序,然后按名称排序(就像在 Windows 资源管理器中一样)。
Expected
预期的
- JAX-WS Web Service
- Deployment Descriptor
- Java Resources
- src (Folder)
- main (Folder)
- java (Folder)
- webapp (Folder)
- b (Folder)
- WEB-INF (Folder)
- a.jsp (File)
- c.jsp (File)
- z.jsp (File)
- pom.xml (File)
- JAX-WS 网络服务
- 部署描述符
- Java资源
- src(文件夹)
- 主要(文件夹)
- java(文件夹)
- webapp(文件夹)
- b(文件夹)
- WEB-INF(文件夹)
- a.jsp(文件)
- c.jsp(文件)
- z.jsp(文件)
- pom.xml(文件)
Previous versions were sorting it this way - I'm just not sure how to set it back.
以前的版本是这样排序的 - 我只是不知道如何将它设置回来。
回答by Cliff Ribaudo
Double check you are not using "Project Explorer", it sorts alphabetically. BUT,
仔细检查您没有使用“项目资源管理器”,它按字母顺序排序。但,
- "Package Explorer" sorts files the way you want.
- "Navigator" also sorts the way your asking and will show hidden files in OSX and Win folders.
- “包资源管理器”以您想要的方式对文件进行排序。
- “导航器”还会对您的询问方式进行排序,并将显示 OSX 和 Win 文件夹中的隐藏文件。
You can access these views via Window->Show View->Other
您可以通过 Window->Show View->Other 访问这些视图
回答by Ravindra Gullapalli
I did it in some other way as the given solution does not worked for me. I went to the customize view option as shown in
我以其他方式做到了,因为给定的解决方案对我不起作用。我进入了自定义视图选项,如图
and then wen to Content tab as shown in
然后转到内容选项卡,如图所示
and then unchecked the "Resources" check box.
然后取消选中“资源”复选框。
回答by u262742
you can uncheck the "Deployed resources" in custom view!
您可以在自定义视图中取消选中“已部署的资源”!