Community
Participate
Working Groups
Build M5 If an external JAR file changes, those changes are not reflected in the Packages view. I exported two classes into a jar, and added that jar to my class path (using a variable). I examined the contents of the jar in the Packages view to verify that it did, indeed, contain those two classes. I then overwrote the jar with another jar which contained a different class. I could not find any way to get the Packages view to update the contents of the jar. I Refreshed the Project, Rebuilt the project, collapsed and expanded the jar, all to no effect. The only way that I could refresh it was to exit and restart. This is a real problem, because I receive updates of external jars once or twice a day from another team using a different VCM system. Everytime they send me changes I need to shutdown Eclipse to have the changes reflected in the UI and in tools like Content Assist.
I don't see how this can be done transparently. So I'd suggest a manual solution. UI offers an action on a JARs to "refresh contents". This would require support from core to flush the corresponding element info from the JAR cache. Moving to JDT CORE for comment.
A manual solution would be to close the offending JAR pkg root using IOpenable#close(), then refresh UI for it. Alternatively when building, we can detect this situation and cause a change notification in the next post-change event. This doesn't prevent from introducing a manual refresh.
Detecting the change on rebuild ensures that the users builds against an up to date JAR. This is good enough to me.
*** Bug 11572 has been marked as a duplicate of this bug. ***
Fixed, added IJavaModel#refreshExternalJARs
Refresh action works fine
Verified