Bug 24019 - Jar Refresh Problem
Summary: Jar Refresh Problem
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-24 08:50 EDT by Marty Jones CLA
Modified: 2002-10-15 11:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marty Jones CLA 2002-09-24 08:50:43 EDT
I have a project that has an external Jar file that is specified in the Java 
Build Path of my project properties.  If I modify that external jar (change
 a method signature in a given class), eclipse does not see the change when I
 am editing a source file that depends on that change that I made in the
 external jar file.

For example,

1) Say a have a project called Test.  It has a reference to an external jar 
called foo.jar.

2) I have a class called DoSomething.java in my Test project that references a 
class in the foo.jar

3) If I change the method signature in the foo.jar that DoSomething.java is 
referencing then eclipse is not seeing the change in the foo.jar file.  I tried 
to refresh and rebuild the project but it does not see the change.  The only 
way to make the DoSomething.java class see the jar change is to get out of 
Eclipse all together and come back in.
Comment 1 Philipe Mulet CLA 2002-09-25 05:30:29 EDT
Did you try to refresh the JAR by selecting it in the package explorer view and 
use the refresh action from the pop-up menu ? (not inside the navigator, in the 
package explorer view).

Comment 2 Marty Jones CLA 2002-09-27 08:13:13 EDT
I have not tried doing a refresh from the package explorer.  I would expect the 
Rebuild project to reload the references for the external jars.  
Comment 3 Philipe Mulet CLA 2002-09-30 05:11:03 EDT
Refreshing is expensive, we will only do so when asked to. 
We could add a mechanism for automatically performing it on build action, but 
this is likely going to slow down the build in general, just to check that 
nothing changed.

Why is "refresh" a problem at all ? Isn't it what you do in the navigator 
already if you change some resource directly on the filesystem and want to have 
Eclipse see the changes ? 
Comment 4 Philipe Mulet CLA 2002-10-09 08:48:37 EDT
Ok to close?
Comment 5 Marty Jones CLA 2002-10-09 08:52:33 EDT
[Your last response]

Why is "refresh" a problem at all ? Isn't it what you do in the navigator 
already if you change some resource directly on the filesystem and want to have 
Eclipse see the changes ? 

That is what I am saying, a refresh on my source java file will not see the 
change that occurred in the jar file. The only way that I can get my source 
java file to see the change that occurred in the jar file is to shut down 
eclipse completely and start it back up.

Am I missing something?

Comment 6 Marty Jones CLA 2002-10-09 12:11:23 EDT
After thinking about it a little more, I believe that eclipse should not 
refresh the external jars when you refresh a given java source file but I DO 
think that external jars should be reloaded if you refresh the project itself.
Comment 7 Philipe Mulet CLA 2002-10-11 06:58:55 EDT
But this is what happens if you perform a refresh action in the package 
explorer view. Not in the navigator.

Aren't you seeing this behavior already ? Note that we could not hook the JAR 
refresh into the navigator (if we could we'd have done it).

Please confirm whether it works or not. 
Comment 8 Marty Jones CLA 2002-10-11 08:19:37 EDT
If I refresh from within the Package viewer then it works as it should.  It 
would be nice if the refresh worked within the Navigator view but as you 
explained in your previous post that is not possible.  Sorry for all the 
confusion.  I will refresh from the Packager viewer from now on.
Comment 9 Philipe Mulet CLA 2002-10-15 11:03:37 EDT
Good, closing then.