Reputation: 1381
I am developing a plugin for Eclipse. When i execute my plugin, the plugin opens new Eclipse Instance with different workspace location. I want to use the same workspace as the 1st instance of Eclipse uses. So i changed settings in run configurations. But, it gave error because the workspace is already in use.
I wrote a code stub, to get pid of 1st instance of Eclipse and terminated it. Now i have only one Eclipse window running. I want to change location of workspace now, because the earlier Eclipse window is closed and workspace is free to use now.
This is my first post. If i am too ambiguous, please tell me i will explain
Upvotes: 0
Views: 650
Reputation: 10654
You can restart eclipse and fill in some system properties. That will cause your eclipse instance to relaunch. See the org.eclipse.ui.internal.ide.actions.OpenWorkspaceAction.restart(String)
method in the org.eclipse.ui.ide plugin for an example of how eclipse restarts and passes a new workspace back to the launcher.
Also see the discussion in https://bugs.eclipse.org/bugs/show_bug.cgi?id=61809
PW
Upvotes: 1