Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2008-04-25 16:09:36 +0000
committerPascal Rapicault2008-04-25 16:09:36 +0000
commitdb7b4fdd045c012c1bceab21fe8d6228d7cb6bb1 (patch)
tree4e2d462b7a5a1b3e5525e6b1d8ef2455b34d4c69 /bundles/org.eclipse.equinox.frameworkadmin.equinox
parent02c5e42e82cc09d02fa9a637aa595befc25bc687 (diff)
downloadrt.equinox.p2-db7b4fdd045c012c1bceab21fe8d6228d7cb6bb1.tar.gz
rt.equinox.p2-db7b4fdd045c012c1bceab21fe8d6228d7cb6bb1.tar.xz
rt.equinox.p2-db7b4fdd045c012c1bceab21fe8d6228d7cb6bb1.zip
matching of command line args should do an equals instead of startsWith
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.equinox')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
index fae66eabd..05812e998 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
@@ -138,11 +138,11 @@ public class EclipseLauncherParser {
launcherData.addJvmArg(line);
continue;
}
- if (line.startsWith("-vmargs")) {
+ if (line.equalsIgnoreCase(EquinoxConstants.OPTION_VMARGS)) {
vmArgsFlag = true;
continue;
}
- if (line.startsWith(EquinoxConstants.OPTION_CONFIGURATION)) {
+ if (line.equalsIgnoreCase(EquinoxConstants.OPTION_CONFIGURATION)) {
final String nextLine = lines[++i].trim();
File file = new File(nextLine);
if (!file.isAbsolute())
@@ -150,11 +150,11 @@ public class EclipseLauncherParser {
fwPersistentDataLoc = file;
needToUpdate = true;
continue;
- } else if (line.startsWith(EquinoxConstants.OPTION_CLEAN)) {
+ } else if (line.equalsIgnoreCase(EquinoxConstants.OPTION_CLEAN)) {
clean = true;
needToUpdate = true;
continue;
- } else if (line.startsWith(EquinoxConstants.OPTION_VM)) {
+ } else if (line.equalsIgnoreCase(EquinoxConstants.OPTION_VM)) {
final String nextLine = lines[++i].trim();
File file = new File(nextLine);
if (!file.isAbsolute()) {
@@ -162,7 +162,7 @@ public class EclipseLauncherParser {
}
launcherData.setJvm(file);
continue;
- } else if (line.startsWith(EquinoxConstants.OPTION_FW)) {
+ } else if (line.equalsIgnoreCase(EquinoxConstants.OPTION_FW)) {
final String nextLine = lines[++i].trim();
File file = new File(nextLine);
if (!file.isAbsolute()) {
@@ -277,6 +277,17 @@ public class EclipseLauncherParser {
i++;
continue;
}
+ Path configLocation = new Path(lines[i + 1]);
+ Path osgiPath = new Path(osgiInstallArea);
+ int commonSegments = osgiPath.matchingFirstSegments(configLocation.removeLastSegments(1));
+ if (commonSegments == configLocation.segmentCount() - 1) {
+ String path = "";
+ for (int j = osgiPath.segmentCount() - commonSegments; j != 0; j--) {
+ path += "../";
+ }
+ path += "configuration";
+ lines[i + 1] = path;
+ }
}
}
bw.write(lines[i]);

Back to the top