diff options
3 files changed, 22 insertions, 20 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF index 7889fc06f..1c448b71f 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true -Bundle-Version: 2.2.500.qualifier +Bundle-Version: 2.2.600.qualifier Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml index 55afd427d..c99929b6a 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml @@ -9,6 +9,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId> - <version>2.2.500-SNAPSHOT</version> + <version>2.2.600-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java index 76612bee7..5a6b3e7cf 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java @@ -71,26 +71,28 @@ public class SetJvmAction extends ProvisioningAction { private static void adjustWorkbenchSystemProperties(File jvm) { try { - // set the eclipse.vm system property so the Workbench restart will use this vm - // to restart. - final String fullPath = jvm.getCanonicalPath(); - System.setProperty("eclipse.vm", fullPath); + String eclipseCommands = System.getProperty("eclipse.commands"); //$NON-NLS-1$ + if (eclipseCommands != null) { + // set the eclipse.vm system property so the Workbench restart will use this vm + // to restart. + final String fullPath = jvm.getCanonicalPath(); + System.setProperty("eclipse.vm", fullPath); //$NON-NLS-1$ - // also adjust the -vm property in the eclipse.commands system property so that - // vm is actually used. - String property = System.getProperty("eclipse.commands"); - int index = property.indexOf("-vm"); - if (index != -1) { - final String vmWithLineFeed = "-vm\n"; - // find the next line ending after -vm line. - int index2 = property.indexOf('\n', index + vmWithLineFeed.length()); - if (index2 == -1) { - property = property.substring(0, index) + vmWithLineFeed + fullPath; - } else { - String tmp = property.substring(0, index) + vmWithLineFeed + fullPath; - property = tmp + property.substring(index2); + // also adjust the -vm property in the eclipse.commands system property so that + // vm is actually used. + int index = eclipseCommands.indexOf("-vm"); //$NON-NLS-1$ + if (index != -1) { + final String vmWithLineFeed = "-vm\n"; //$NON-NLS-1$ + // find the next line ending after -vm line. + int index2 = eclipseCommands.indexOf('\n', index + vmWithLineFeed.length()); + if (index2 == -1) { + eclipseCommands = eclipseCommands.substring(0, index) + vmWithLineFeed + fullPath; + } else { + String tmp = eclipseCommands.substring(0, index) + vmWithLineFeed + fullPath; + eclipseCommands = tmp + eclipseCommands.substring(index2); + } + System.setProperty("eclipse.commands", eclipseCommands); //$NON-NLS-1$ } - System.setProperty("eclipse.commands", property); } } catch (IOException e) { |