Bug 108346 - Reuse classpath entries from IJavaProject#getRawClasspath()
Summary: Reuse classpath entries from IJavaProject#getRawClasspath()
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-30 06:50 EDT by Jerome Lanneluc CLA
Modified: 2005-08-31 12:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2005-08-30 06:50:20 EDT
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.
Comment 1 Dirk Baeumer CLA 2005-08-30 12:29:25 EDT
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".
Comment 2 Jerome Lanneluc CLA 2005-08-31 09:45:49 EDT
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.
Comment 3 Dirk Baeumer CLA 2005-08-31 12:32:24 EDT
Thanks Jerome for the info. I will close the PR then.