Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Compagner2020-01-14 11:44:01 +0000
committerJohan Compagner2020-01-14 13:39:35 +0000
commit734456b965887a796266427e6ae969273a7be6da (patch)
treefae1a1697efb7cb2e73a73d14f905819151b1c24
parent6a74744884e5cbdd5778040532cc1a0f6f698f7b (diff)
downloadrt.equinox.p2-I20200116-0310.tar.gz
rt.equinox.p2-I20200116-0310.tar.xz
rt.equinox.p2-I20200116-0310.zip
exotic packaging (eg, in Tycho) fixed the nullpointer, dont do anything if the system property "eclipse.commands" is not there. So clean up of i18n strings. Change-Id: I7493b667c625d0d34ec3aa8cea8c8fd7aadbaeaa Signed-off-by: Johan Compagner <jcompagner@gmail.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java38
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) {

Back to the top