如何在Eclipse中的Open Resource对话框中隐藏.class文件? [英] How do I hide .class files from the Open Resource dialog in Eclipse?

查看:883
本文介绍了如何在Eclipse中的Open Resource对话框中隐藏.class文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想编辑任何工作集。我只是希望在所有的工作区和项目中,阻止.class文件在开放资源对话框中显示。有没有办法这样做?

I won't want to have edit any working sets. I just want a way to, across all workspaces and projects, prevent .class files from ever showing in the Open Resource Dialog. Is there a way to do this?

推荐答案

一个选项是过滤衍生资源。在开放资源对话框的右上角有一个箭头,您可以单击以打开一个下拉菜单进行过滤。取消勾选显示衍生资源选项。

One option is to filter derived resources. In the upper right corner of the 'Open Resource' dialog there is an arrow you can click to bring up a dropdown menu for filtering. Uncheck the 'Show Derived Resources' option, if it is checked.

如果仍然看到'.class'文件,那么它们可能没有被标记为派生类。如果他们自己在自己的文件夹层次结构中,可以通过右键单击根文件夹来编辑文件夹属性来修复此问题,并选中派生复选框。如果它们与你的'.java'文件混合在一起,那么你将需要手动在每个'.class'文件上设置派生属性。

If you still see '.class' files, they probably aren't being marked as derived. If they're by themselves in their own folder hierarchy you can fix this by right-clicking the root folder to edit folder properties, and check the 'Derived' checkbox. If they're mixed with your '.java' files...tough luck, you'll need to set the derived property on each '.class' file by hand.

据我所知,无法将类文件标记为全局工作区的派生资源,但我相信,当您创建一个新的Java项目时,bin文件夹将默认标记为派生(如果使用默认值向导设置)

As far as I can tell there's no way to mark class files as derived resources globally for the workspace, but I believe when you create a new Java project the 'bin' folder is marked as derived by default (if you use the default wizard settings)

以下是Eclipse Kepler的一些屏幕截图。第一个显示如何过滤派生资源。第二个显示如何在资源上设置派生属性。

Here are some screenshots from Eclipse Kepler. The first shows how to filter derived resources. The second shows how to set the 'Derived' property on a resource.

>

这篇关于如何在Eclipse中的Open Resource对话框中隐藏.class文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆