Tuesday, July 8, 2008

How to fix "workspace excited with unsaved changes" issue?

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

While using the workspace resources in Eclipse 3.4 RCP application, if you get the above message whenever you restart the workbench, then you need to save the workspace, before existing the workbench. One possible, way to do this is to overload the preWindowShellClose() method in your of WorkbenchWindowAdvisor. You can save the workspace by using ResourcesPlugin.getWorkspace().save(...) method.

Following snippet elaborates this (this snippet was modified from revision 32 of ApplicationWorkbenchWindowAdvisor):

blog comments powered by Disqus