Summary: | Exception calling sourceType.getFields on working copy of new class | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tim Francis <francis> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P2 | CC: | celek, Darin_Swanson |
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Tim Francis
2002-05-09 16:39:53 EDT
As far as we can reproduce under debugger, the exception seems legite since the offending working copy only contains a package statement. What is it supposed to contain at this stage ? The same code works for other classes that are generated, and for this class with previous versions of JDT. I can't give you a definitive list of what should exist in the working set at that point in time without more research... but it should certainly include all the pre-reqs (the CU, the class, etc). I'm quite willing to believe that the problem is upstream in the process, perhaps during the creation of the class, and the exception I'm seeing when calling getFields is not the root cause of the problem -- but something has changed in JDT, as the scenario used to work (and still does in most cases). It turned out that the problem was our. WorkingCopy.openBuffer() was loosing the new contents of the buffer because it was flushed from the buffer cache before the contents was set. Fixed and released (and thanks a lot for your help Tim) *** Bug 15349 has been marked as a duplicate of this bug. *** |