Summary: | Must restart Eclipse after debug of source in .zip is updated | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Rob Tulloh <rtulloh> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 2.0.1 | ||
Target Milestone: | 2.1 M1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Rob Tulloh
2002-09-07 00:58:05 EDT
Source attachments are maintained by the "java model" (JDT CORE). It sounds like your compile/build/debug process includes the creation of a new jar, with a new source attachment. How is this jar used/referenced at runtime? A reproduceable test case would help explain this problem. Project J (the Java project) depends on jar files and sources from Project S (the Simple Project). Project S is maintained by an Ant build configuration that generates a jar file (wbem.jar) and a source file (wbemsrc.jar). The latter jar file is created purely to satisfy Eclipse's desire for a jar or zip file for source attachment. Project J contains JUnit test cases for Project S. I often debug problems within the Debug perspective when Project J turns up a test case failure. The problem occurs when I fix a problem in Project S and re-run the build. This causes the wbem.jar and wbemsrc.jar files to be updated. When I go back to the Debug Perspective, it somehow retains a pointer to the previous source files and the debug sessions are mismatched with the source. The only solution is to close all perspectives and restart Eclipse. Eclipse will then re-read the environment and start with fresh pointers to the wbem.jar and wbemsrc.jar files. If you wanted to create a test for this problem, try importing the wbemservices SDK as a simple project in Eclipse. Use it's already provided ant_build.bat file to build the project. Create a separate project in the Java perspective that uses the wbem.jar and parser.jar file from the wbemservices build. Debug a test case against some API in the wbemservices jar file. Make any change you like to the wbemservices sources and rebuild them. When you debug again, you will find the mismatched sources problem and I see no way to convince Eclipse to discard the pointer to the old file and read it fresh from the wbemsrc.jar. Hope this helps. Thanks for listening, Rob Moving to JCORE. Sounds like the problem is that when the jar is updated, the source attachment is not updated. DeltaProcessor was not handling changes in source attachment. Fixed. Rob, note that you have to refresh the simple project S as you modify the wbemsrc.jar file using an external tool and Eclipse is not capable of discovering the change without a refresh. I think I have tried refreshing and don't remember that helping. I will try this again today to be sure though. Thanks for the idea. ROb Refresh all projects. Re-entered Debug. Old sources still! Rob, unless you're running a nightly build, I don't think you have the fix yet. It was released on 09/12 and should be included in today's integration build (09/17). Marked as fixed. Please reopen if symptoms persist beyond today's integration build. Verified. |