Community
Participate
Working Groups
We need to support the following cases regarding working copies: * A working copy can be opened for a non-existing source file. Hence, we should not attempt to open ancestor elements when a working copy is being opened (see #generateBodies) as some of its ancestors might not exist. See also bug 89411. * A working copy may never be removed from the body cache. This needs to be properly enforced. Currently, we try to do that in SourceFile's override of Handle#close(), but HandleManager#removeBodyAndChildren recursively removes children without calling their close() method, so a working copy can still be (erroneously) removed from the cache if its ancestor is closed. * JDT PackageFragment explicitly adds child working copies in its #buildStructure implementation. We should provide a new method HandleManager#getWorkingCopies() to allow for that.
Pushed to master: http://git.eclipse.org/c/handly/org.eclipse.handly.git/commit/?id=ffb5aa1b2da9aff3cb11fa808b100f936b0e0f6e Note that a few breaking changes have been introduced: * Handle#close() is final now. It delegates to the newly introduced #close(boolean) which is not final. * Handle#getOpenableParent() is final now. It is a template method that calls the newly introduced #isOpenable() which is not final. * SourceFile#shouldRebuildStructureIfForced() has moved into the inner class ReconcileOperation.