Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 28251 - UI state when starting Eclipse exactly the same as the state at last shutdown
Summary: UI state when starting Eclipse exactly the same as the state at last shutdown
Status: RESOLVED DUPLICATE of bug 44295
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-13 06:26 EST by Henning Boeger CLA
Modified: 2005-08-08 13:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Boeger CLA 2002-12-13 06:26:03 EST
Currently, the files which were open at the last shutdown of eclipse are 
reopened upon startup.

Additionally, the following features would be useful:
- The cursor position of the current active file in the editor is at the same 
position as it was at shutdown
- Comparison windows which were open at shutdown are reopened
Comment 1 Marko Schulz CLA 2003-08-10 09:02:41 EDT
Yes, the missing cursor positions annoy me too :-(

Actually, the navigation history is saved, so one can easily go to the places,
last visited in the editors: Just press ALT-LEFT ALT-RIGHT to reach the last
edit position or ALT-LEFT multiple times (without ALT-RIGHT) for the edit
positions before that.

An incomplete (though IMHO already quite helpful) solution would be, to at least
restore the last edit position be quering the navigation history on startup,
which could be (untested!) accomplished by patching
org.eclipse.ui.internal.WorkbenchPage#restoreState(IMemento
memento,IPerspectiveDescriptor activeDescritor):

		childMem = memento.getChild(IWorkbenchConstants.TAG_NAVIGATION_HISTORY);
-		if(childMem != null)
+		if(childMem != null) {
			navigationHistory.restoreState(childMem);
+			if (navigationHistory.getCurrentLocation() != null) {
+				navigationHistory.getCurrentLocation().restoreLocation();
+			}
+		}
		else if(getActiveEditor() != null)
			navigationHistory.markEditor(getActiveEditor());

Comment 2 Marko Schulz CLA 2003-11-06 05:55:44 EST
This bug overlaps with bug 44295. I don't know bugzilla well enough, whether
this should result in a 'mark duplicate', 'depends on' or something else.

Since that other bug is more focused (which I think is better), I will add
further comments to the problem there.
Comment 3 Tod Creasey CLA 2005-08-08 13:36:32 EDT

*** This bug has been marked as a duplicate of 44295 ***