Community
Participate
Working Groups
3.1 and I20050830 To be able to read and persist unknown attributes in a .classpath file (see bug 101425), the build path wizard must reuse classpath entries coming from IJavaProject#getRawClasspath(). Currently the build path wizard recreate IClasspathEntries using JavaCore#new*Entry(...) when the user edits the build path to add a new source entry for example.
I looked into this and I think it should be doable by remembering the initial class path entry in the fCachedEntry, however I have to double check with Martin since we can't take any risk here for 3.1.1 What worries me more is that fact the WTP and other products sitting on top of Eclipse have UI to manipulate the classpath as well (for example the whole WebApplication classpath management is more more complicated than a simply Java class path). We know this is we add code in 3.0 to make sure that we don't override and classpath changes done on a different properties page. Given that they might have copied JDT/UI code there is some a good change that we will not preserve extra/unknown attributes even if JDT/UI fixes this. One other possibility would be that Core compares the entries before writing them back and attaches any unknown attributes to entries which are still the "same".
A new patch has been attached to bug 101425 which makes this one obsolete. Thanks for investigating it, and sorry for the disturbance. Please close at your convenience.
Thanks Jerome for the info. I will close the PR then.