Community
Participate
Working Groups
Using 4.3.0-I20130605-2000. 1. Open a Java source file in Java perspective 2. Change perspective (Debug for example) 3. Open a second source file 4. Drag the second file tab so that it gets opened in a second editor in it's own view (not in the same area) 5. Go back to Java perspective 6. Try to close all files (Ctrl+Shift+W). Files don't close.
Can reproduce using latest 4.4 build.
Proposed fix: https://git.eclipse.org/r/#/c/15079/ I am not completely sure about this fix since I don't know the semantics of some things. Basically, hidePart fails because it's called with local == true and partService.getParts() doesn't contain the second editor part. I'm not sure what the semantics of local or getParts are supposed to be but it seems to me that whether or not the part is local, it should be closed which is what this fix does. I looked at PartServiceImpl.getParts and interestingly, it doesn't return all parts: EModelService.OUTSIDE_PERSPECTIVE | EModelService.IN_ACTIVE_PERSPECTIVE | EModelService.IN_SHARED_AREA It seems like this is meant to be a "getVisibleParts" and there might be a wrong assumption that all editors will be in the shared area. But this is just a theory.
Eric, could you take a look at this fix? It's the case where the editor is outside the shared area. PW
Eric? ;)
Beauty, thanks Marc !! Committed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c1156eb060b87e108c78c67984d3b101f5bb14e6
BTW, I think this has also pointed out a bug in the 'findElements' API; the PartService's 'getParts' call is explicit that it should only look in the 'ACTIVE' perspective so it shouldn't really have even found the editor in the Debug perspective... No problem for this but I'll open a defect to track down what's wrong in the find code (then change the part service to match..;-).
*** Bug 417122 has been marked as a duplicate of this bug. ***
Verified in 4.4.0.I20131028-2000.
*** Bug 400960 has been marked as a duplicate of this bug. ***