Community
Participate
Working Groups
I20030925 + JDT/Core build input for 20030930 The failing test case is MoveTest. Here is what happens: - we create a Java project with a source folder - the source folder contains p1 with cus A.java and B.java p2 with cu C.java - then we move the two cus from p1 to p2 using the following Java/Core API: getCu().move(getDestinationPackage(), null, newName, true, pm); Both the cu to move (e.g. call getCu()) and the destination package are recreated from handles (e.g. strings like "=TestProject1064857227528/src<p1 {A.java" - after moving the cus a call getChildren() to the package fragment p1 created in the test returns the two children A.java and B.java. - checking on the file system reveals that they have been correctly moved to p2.
Even pack1.getResource.refreshLocal() doesn't bring the package back in sync with the underlying file system.
If the resource is in sync already, refreshing it doesn't do anything. The only relevant thing to try is close/reopen project to force a model update.
Problems comes from a breaking change in the platform with change notifications. Now long running operations may broadcast intermediate refresh notifications, thus revealing internal aspects. This issue has been reported already by PDE, and we believe this could be a problem in our JDT tests, since we are assuming a workspace runnable is queuing all change notifications until the end (and thus expect a very specific shape of batched delta, we may no longer rely upon). This accounts for some random JDT Core test failures in integration/nightly build. Now we realize it is actually even worse, since our Java model operations too are strongly relying on IWorkskaceRunnable to batch all changes until the end. In this particular scenario the resource move is notified prior to the fine grain Java delta (type rename) which is causing trouble to clients who are getting 2 volleys of notifications.
Actually, there is a model inconsistency on our end too. Need to investigate. Likely the delta change gets us in an unexpected situation.
DeltaProcessor was filtering too much and not updating the Java model. Fixed and added regression test WorkingCopyOwnerTests.testMoveWorkingCopy()
Verified.