Community
Participate
Working Groups
I20050209 - have 2 editor areas in your workbench, left and right - in the left area, open A.java and B.java (use multiple tabs) - in the right area, open C.java - make sure that in the left area, B.java (the second tab) is visible (i.e. at the top of the editor stack) - give focus to the right area (C.java) - quit eclipse (ensure you don't close any editors when shutting down) - restart eclipse - the editors are restored as they were when shutting down Expected: only B.java (in the left editor area) and C.java (in the right area) are real editors. A.java is showing as a tab, but the underlying editor is not instantiated. Actual: A.java is already activated. When quering the workbench page whether A.java is visible, it returns false. When activating A.java, an IPartListener2 will receive a partActivated event for A.java, but not a partVisible event. Note that this behavior is only reproducible if A.java is the first tab in an editor area, but not the one that is visible. Other editors than the first one in an editor stack are not instantiated until they are made visible.
Also reproducible on Windows, so changing hardware and OS accordingly. Reproducible in 3.1 M4 and M5.
Marking for consideration for 3.1.
I have seen cases in my performance.log where at least three Java editors were created on startup (I20050315). This suggests there is a deeper problem than the currently reproducible case of the first editor in the list always being restored. Note: bug 83316 looks like a duplicate.
The first editor in a workbook is always restored, even if it is not the active one. This is due to the requirement that presentations always have a selected part if they have any parts. It selects the first editor when it is added. It should defer this until the selection is restored.
I just checked: opened A, B, C, with C active, shutdown/restart, and A and C get eagerly restored. A should not, but that is due to the problem described in the previous comment. John, silly question, but are you using multiple windows? If you see any further patterns that might help us explain how multiple editors are getting eagerl restored, please log them here.
I've filed bug 89374 for the partVisible event notification problem.
I never use multiple windows, or split my editor pane. I do typically have two or three perspectives open. All I have now is the evidence from my performance log - I'll try to find a reproducible case where more than two editors are being opened.
*** Bug 75558 has been marked as a duplicate of this bug. ***
Here's an even better scenario: Create two editor stacks. until (lots of editors open) { Click on the left stack Open an editor by double-clicking a file Click on the right stack Open an editor by double-clicking a file repeat... } Restart the workbench This will activate every editor in the workspace. BTW, I've got a fix for this ready but it's a big patch and I'm still testing it.
There is a fix for this in bug 89246
Fixed in HEAD
Verified in I20050510-0010