Reputation: 22126
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?
Edit: 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.
Upvotes: 11
Views: 3349
Reputation: 19990
This is not an answer to the question, but something that is directly related what I believe to be the issue at hand. That being the ability to share which files should be derived in a project with others.
Found this plugin to address that: http://nodj.github.io/AutoDeriv/
Upvotes: 2
Reputation: 735
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.
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);
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.
Upvotes: 6