| Summary: | [Preferences] Save preferences at timed intervals | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Felix Berger <bflat1> | ||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Oleg Besedin <ob1.eclipse> | ||||
| Severity: | enhancement | ||||||
| Priority: | P5 | CC: | digulla, Kevin_McGuire | ||||
| Version: | 3.4 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Felix Berger
Interesting. I was able to shut down with three windows and I got all three back, but I did get the following error from an editor from the first window: Unable to create editor ID org.eclipse.jdt.ui.ClassFileEditor: Factory org.eclipse.jdt.ui.ClassFileEditorInputFactory returned null from createElement for editor id=org.eclipse.jdt.ui.ClassFileEditor name=FilteredResourcesSelectionDialog.class Can you check to see if you have any related errors hidden in your log please? Created attachment 80513 [details]
Log in 3.4M2 with jdt.ui.ClassFileEditorInputFactory throwing PartInitException
Attaching my log in case related.
It works with 3 windows when I exit Eclipse through the File menu. Might be related to session management on KDE. (In reply to comment #3) > It works with 3 windows when I exit Eclipse through the File menu. > > Might be related to session management on KDE. In the original bug description, how were you exiting? On shutdown we write preference information which includes all your window state. Its possible that an exception on shutdown, either in our code or another plugin's, could prevent this from completing. Have you checked the log for anything related? The .log file is in the .metadata directory of your workspace. Finally, I should point out that my test was on XP and as you noted, you're on Linux, although its an unlikely factor. (In reply to comment #4) > > It works with 3 windows when I exit Eclipse through the File menu. > > > > Might be related to session management on KDE. > > In the original bug description, how were you exiting? Usually implicilty when shutting down KDE. But today the session management restored eclipse with all three windows though in different places. > On shutdown we write preference information which includes all your window > state. Its possible that an exception on shutdown, either in our code or > another plugin's, could prevent this from completing. Have you checked the log > for anything related? The .log file is in the .metadata directory of your > workspace. Maybe the recent uprade to 3.3.1 fixed that and I didn't notice. I could only find this warning at startup: "The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes." (In reply to comment #5) > Usually implicilty when shutting down KDE. But today the session management > restored eclipse with all three windows though in different places. ... > I could only find this warning at startup: > > "The workspace exited with unsaved changes in the previous session; refreshing > workspace to recover changes." I don't run KDE/Unix so sorry for the stupid question but, do you mean you just log out of the OS or shut down the OS window manager, which kills all running programs (including Eclipse)? (In reply to comment #6) > I don't run KDE/Unix so sorry for the stupid question but, do you mean you just > log out of the OS or shut down the OS window manager, which kills all running > programs (including Eclipse)? Yes, saving some session information for KDE to restore the program at startup on the same Desktop etc. I'm not sure which signal is sent to the programs on logout though. Moving to core for comment. Seems either, 1) this type of shutdown just doesn't work for eclipse 2) we're suppose to handle it but don't Kevin is correct, we store preferences when we are told and we don't handle killing the process or any other means of exiting Eclipse that doesn't go through the regular plug-in life-cycle. The message that you are getting in your log file means that workspace state has been lost. Not only your window state, but perhaps state of the resources as well. That is why we do a refresh to try and recover. For this reason, we do not recommend exiting Eclipse in this manner. It would be a very useful feature to handle signals correctly and persist data on a TERM signal. I found two Java articles regarding signal handling: http://www.ibm.com/developerworks/ibm/library/i-signalhandling/ http://www.dclausen.net/javahacks/signal.html A workaround would be to have the state be persisted every couple of minutes in a background thread if that's possible. Thus the user would at least get a very recent state of the workbench on relaunch. Should I file a new bug with this feature request or reopen this one and rename it? After consultation with members of the team (ok, Tom told me) it turns out we already have a request to be able to handle termination. See bug 46381. Let's use that one to address that problem. I will re-open this report and we can use it to track down the UI feature request of saving preferences at timed intervals. *** Bug 337593 has been marked as a duplicate of this bug. *** From some digging around, the request to save UI state more frequently is essentially bug 2369 (whether this is done based on an interval or an explicit user action is a minor detail - if we had the mechanism in place we could easily allow both). *** This bug has been marked as a duplicate of bug 2369 *** |