Eclipse - 忽略整个目录 [英] Eclipse - Ignore Entire Directories

查看:142
本文介绍了Eclipse - 忽略整个目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Aptana Studio(基于Eclipse)。我试图让Eclipse完全忽略一个项目中的整个目录。我的意思是完全我不希望它在项目文件夹中显示。我不希望Eclipse甚至意识到它存在。



不幸的是,我所有努力将其添加为过滤器不起作用。请参阅 http://forums.aptana.com/viewtopic.php? f = 14& t = 8340#p33714 。我认为过滤器只能防止文件夹显示在项目显示中。它不会使Eclipse不会实际查看该文件夹中的所有文件以进行代码协助等。



我的问题是该目录有数千个文本文件。所以,每次Eclipse打开或刷新这个项目,它会分析所有这些文件。



如何防止这种情况?

解决方案

链接的资源(指向磁盘上的某些其他文件/文件夹)在资源树中的同一位置具有相同的名称,那么磁盘上的真实文件夹将从资源模型中隐藏。



不幸的是,如果实际目录已经存在于项目结构中,则无法创建链接的资源。您可以尝试以下方式:


  1. 在磁盘上,重命名/移动有问题的目录

  2. 刷新项目,目录已经消失

  3. 在文件系统中创建链接的资源(新建 - >文件/文件夹>>高级 - >链接到文件)。将其命名为与原始目录相同。

  4. 在磁盘上,恢复目录的原始名称

  5. 刷新项目。


I use Aptana Studio (based on Eclipse). I'm trying to get Eclipse to completely ignore an entire directory inside a project. I mean COMPLETELY. I don't want it to display in the project folder. I don't want Eclipse to even be aware it exists.

Unfortunately, all my efforts to add it as a filter don't work. See http://forums.aptana.com/viewtopic.php?f=14&t=8340#p33714 . I think the filter only prevents the folder from being displayed in the project display. It doesn't keep Eclipse from actually looking at all the files in that folder for code assist, etc.

My problem is that directory has thousands of text files. So, each time Eclipse opens or refreshes this project, it analyzes all those files.

How can I prevent this?

解决方案

If you have a linked resource (pointing off to some other file/folder on disk) with the same name in the same location in the resource tree, then the real folder on disk will be hidden from the resource model.

Unfortunately you can't create the linked resource if the real directory is already there in the project structure. You can try something like this:

  1. On disk, rename/move the directory in question
  2. Refresh the project, the directory is gone
  3. Create a linked resource ( New -> File/Folder >> Advanced -> Link to file in the file system ). Name it the same as the original directory.
  4. On disk, restore the original name of the directory
  5. Refresh project.

这篇关于Eclipse - 忽略整个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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