Figured it out. Before the workbench starts (ie. in a bundle with a lower start level than the workbench bundle) you just have to delete the workbench.xml. Then I set a preference to ensure this is only done once.
if (!(new InstanceScope().getNode("org.eclipse.ui.workbench").getBoolean("alreadyMigrated", false)) {
IPath location = Platform.getLocation();
IPath workbenchXml = location.addTrailingSeperator().append(".metadata").addTrailingSeperator().append(".plugins").addTrailingSeperator().append("org.eclipse.ui.workbench").addTrailingSeperator().append("workbench.xml");
if (workbenchXml.toFile().exists()) {
workbenchXml.toFile().delete();
}
new InstanceScope().getNode("org.eclipse.ui.workbench").setBoolean("alreadyMigrated", true);
[Updated on: Fri, 16 September 2011 19:08]
Report message to a moderator