Bug 11572

Summary: Cannot refresh a jar file
Product: [Eclipse Project] JDT Reporter: Luc Bourlier <eclipse>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: erich_gamma, gilbert_martinez, support
Version: 2.0   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Luc Bourlier CLA 2002-03-18 12:22:59 EST
1. overwrite a jar file in your file system
2. right-clic in the tree node which represents the jar file
==> you can't select "Refresh From Local"

you have to :
3. delete the link to the jar (right-clic / Delete).
4. open the project properties window (right-clic / Properties).
5. add the jar as an external jar.
6. close the project properties window.

and you can't :
3. open the project properties window (right-clic / Properties).
4. remove the jar.
5. add the jar as an external jar.
6. close the project properties window.
==> no update
Comment 1 Erich Gamma CLA 2002-03-25 06:24:32 EST
external JARs are unmanaged resources hence refresh from local doesn't work.

adding and remove in the UI doesn't work since the JavaCore doesn't see the 
difference. 

the only other workaround that comes to mind is to close and reopen project.

adding a refresh button for external JARs on the build path property page would 
be another option, but there is no JDT Core API to refresh a build path entry.
Moving to JDT Core for comment.
Comment 2 Erich Gamma CLA 2002-03-25 06:24:54 EST
changed version to 2.0
Comment 3 Philipe Mulet CLA 2002-03-25 07:12:37 EST
We would need some way to be notified that the user performed a 'refresh from 
local', and update all external JAR references.

A separate mechanism wouldn't be intuitive.
Comment 4 Philipe Mulet CLA 2002-03-25 11:08:16 EST
If adding such a refresh entry functionality, would you call it upon refresh 
from local ?
Comment 5 OTI Support CLA 2002-05-15 20:41:16 EDT
Will a fix make it into 2.0?
Comment 6 OTI Support CLA 2002-05-16 18:39:21 EDT
Conference call with customer tomorrow on this issue.   Can someone please 
comment on the current status of this issue?   

Additional test data regarding this has also been provided:

Additional testing appears to show that the source attachment is not refreshed 
in WSAD but the actual code is. The code changes are picked up at runtime but 
changes to the source of the class are not visible when the class is opened to 
the editor. In my testing, this scenario occurs if the jar file is referenced 
as a jar file or an external jar file. 
Comment 7 Erich Gamma CLA 2002-05-16 19:31:13 EDT
pls see 16091
Comment 8 Erich Gamma CLA 2002-05-16 19:32:26 EDT

*** This bug has been marked as a duplicate of 16091 ***