Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 124615 - [misc] Restore editor selection when restarting eclipse
Summary: [misc] Restore editor selection when restarting eclipse
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: All Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 44295 168429 168524
Blocks:
  Show dependency tree
 
Reported: 2006-01-20 04:30 EST by Dani Megert CLA
Modified: 2006-12-19 06:17 EST (History)
1 user (show)

See Also:


Attachments
Patch implementing this functionality (5.42 KB, patch)
2006-12-14 03:34 EST, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2006-01-20 04:30:45 EST
I20060119-0800

Restore editor selection when restarting eclipse.
See: http://www.eclipsezone.com/eclipse/forums/m91983123.html
Comment 1 Dani Megert CLA 2006-01-20 04:31:12 EST
Time permitting for 3.2.
Comment 2 Dani Megert CLA 2006-02-13 13:07:54 EST
*** Bug 127145 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2006-03-25 10:44:06 EST
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.
Comment 4 Dani Megert CLA 2006-12-14 03:34:29 EST
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).
Comment 5 Dani Megert CLA 2006-12-18 12:13:41 EST
Another problem with the patch is that we see text flickering i.e. the selection is first set to 0 and then restored.
Comment 6 Dani Megert CLA 2006-12-18 13:10:52 EST
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.
Comment 7 Dani Megert CLA 2006-12-19 06:06:10 EST
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.