Community
Participate
Working Groups
I20060119-0800 Restore editor selection when restarting eclipse. See: http://www.eclipsezone.com/eclipse/forums/m91983123.html
Time permitting for 3.2.
*** Bug 127145 has been marked as a duplicate of this bug. ***
I have investigated this. Hacking a solution in Platform Text isn't the right thing and not something I want to do. We have to wait for Platform UI to provide hooks for saving and restoring an IEditorPart state like it is already in place for IViewParts. Bug 44295 is requesting this.
Created attachment 55647 [details] Patch implementing this functionality The patch works but I have to wait to commit it until we get the preference (see bug 44295 comment 18).
Another problem with the patch is that we see text flickering i.e. the selection is first set to 0 and then restored.
I released the initial code to HEAD but commented out the code that actually restores the selection. See AbstractTextEditor$ActivationListener.partOpened(...). To solve the flickering we need bug 168429 to be resolved.
I moved the code from partOpened(...) to partActivated(...) and uncommented the restore code. This makes it work (no flickering) for all editors except the very first one. This is caused by bug 124615 or bug 168524 (fixing one of them should make the problem disappear). I'm marking this one as fixed as the work on the text side is completed.