如何从 Eclipse 项目中删除文件而不从磁盘中删除文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22049498/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:32:52  来源:igfitidea点击:

How to remove a file from an Eclipse project without deleting the file from the disk?

eclipse

提问by Kaveh

Is it possible to remove a file from an Eclipse project without actually deleting the file from the disk?

是否可以从 Eclipse 项目中删除文件而不实际从磁盘中删除文件?

Is there a reason why adding/removing files to/from a project is so tightly connected with what happens to the corresponding files on the disk?

向/从项目添加/删除文件与磁盘上相应文件发生的情况如此紧密相关,是否有原因?

采纳答案by Konstantin Komissarchik

You can filter out file system resources you don't want Eclipse to see. To do that, right click on the folder, go into Properties and then under Resource -> Resource Filters.

您可以过滤掉不想让 Eclipse 看到的文件系统资源。为此,请右键单击该文件夹,进入“属性”,然后在“资源”->“资源过滤器”下。