Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse: explicitly saving project / workspace

Tags:

eclipse

Is there a way to force Eclipse to save project / workspace settings? I can't find a "save workspace" or "save project" command.

(I've never had a problem with this in Eclipse, but TI's Code Composer 4 is based on Eclipse and it sometimes crashes and doesn't retain the changes I made in project settings.)

like image 982
Jason S Avatar asked Mar 05 '10 18:03

Jason S


2 Answers

The surest way to force such a save would be to switch workspace.

Switch to an empty workspace, and then switch back to your current workspace: every project settings should have been saved and restored.

Note: the bug 27821 ([Workbench] saving state and preferences) is a duplicate of:
bug 2369 ([Workbench] Would like to be able to save workspace without exiting), which is opened since... 2001!
So even the "switching workspace" trick might not be enough to save every settings, but that is a start.


Edit September 2011:

Aaron Digulla add in the comments he has added a plugin 'saveui' (bug 337593, which duplicates bug 2369), and which could be a good solution to save your workspace state (without having to close your Eclipse or switch your workspace).

To use this plugin, download the code, open the archive, copy the "dropins" folder into your "eclipse" folder (possibly merging with the existing dropins folder), close Eclipse, and re-open Eclipse. You should see a small lock-like icon in the toolbar, just below the menus. Clicking this icon is supposed to save the workspace.

like image 151
VonC Avatar answered Oct 21 '22 12:10

VonC


The place where is a workspace - workbranch is in Workspace\.metadata\.plugins\org.eclipse.e4.workbench\

You can use wakeup() method to force save workspace

  Job[] jobs = WorkbenchJob.getJobManager().find("WorkbenchAuto-Save Job");
  Job workspaceJob = Arrays.asList(jobs).get(0);
  workspaceJob.wakeUp(); 
like image 37
Soulkan Avatar answered Oct 21 '22 11:10

Soulkan