Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-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