I know that this file
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi save the Eclipse workbench layout after it is closed. And I use this file to export my layout settings. However, be using this file, I need to close the workspace which I want to replace its workbench.xmi file first, then replace the file, then reopen the workspace. I am wondering that where does Eclipse save its workbench layout information when it is running? Can I replace the file when the workspace is still opened?
When it is running the workbench layout is held in an internal EMF model which you should not access directly.
Code using the e4 API can query and modify the model using the
To understand how all this works you need to read up on Eclipse e4 using a tutorial such as this one
Note: This only applies to Eclipse 4.x, Eclipse 3.x is different.