Eclipse在哪里存储关于哪些文件“派生”的信息? [英] Where does Eclipse store information about which files are "Derived"?

查看:1309
本文介绍了Eclipse在哪里存储关于哪些文件“派生”的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您更改Eclipse项目的类路径时, .classpath 文件更改,以便将项目发送给其他人(包括 .classpath 文件)他们有相同的类路径。但是当您将资源更改为派生时, .project .classpath 中没有更改。那么Eclipse在哪里存储有关哪些文件和文件夹的信息?

When you change the classpath of an Eclipse project, the .classpath file changes so that if you send the project to someone else (including the .classpath file) they have the same classpath. But when you change a resource to "Derived", there is no change in either .project or .classpath. So where is Eclipse storing the information about which files and folders are derived?

编辑:我发现这个:当前派生状态存储在与工作空间树文件中的每个资源相关联的
标志整数内的单个位中,但如果有人可以更准确地解释存储该标志整数的位置,以及如何更改它,这将是非常感激的。

I found this: "currently the derived state is stored in a single bit within a flag integer associated with each resource in the workspace tree file" but if someone could explain more precisely where that flag integer is stored, and how to change it, that would be quite appreciated.

推荐答案

这个eclipse错误中,请求派生状态持续使用eclipse项目设置(可以是共享),而不是在工作区元数据(不能)。这个bug很老了,但仍然没有解决,但是还有很多的讨论。

Long discussion on this eclipse bug which requests that derived state is persisted with the eclipse project settings (which can be shared), rather than in the workspace metadata (which can not). The bug is quite old, and remains unaddressed, but there is quite a lot of discussion.

我的情况是我生成了大量的java类文件作为一部分的蚂蚁构建在工作空间目录中,并希望将其标记为派生,以便它们不会显示在搜索中。我认为我将采取的选择可能是调整自动化,以便标记其生成的资源:

My situation is that I'm generating a lot of java class files as part of an ant build in a workspace directory, and want to mark them as derived so they don't show up in searches. I think the option I will take is probably to adjust my automation so that it marks its generated resources as derived:

IResource.setDerived(true);

OP的情况似乎有所不同。我可能会尝试将项目的构建路径放在一个变量上,每个用户可以独立定义,所以您的.classpath文件对于所有用户都是一样的。

The OP's situation seems somewhat different. I'd probably try and base my project's build paths on a variable which each user can define independently, so your .classpath file is the same for all users.

这篇关于Eclipse在哪里存储关于哪些文件“派生”的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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