aboutsummaryrefslogtreecommitdiff
path: root/src/installer/lombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-12-02 23:34:58 +0100
committerReinier Zwitserloot <reinier@tipit.to>2009-12-02 23:34:58 +0100
commite3e8bb2e1dc4c9b0ffb30401da53382089e93ca9 (patch)
tree884007d6e5ee10eebe2b2348f790241a3559f52b /src/installer/lombok
parent8ec48ec281ac85405013cae0f2f7bcd7899d39a0 (diff)
downloadlombok-e3e8bb2e1dc4c9b0ffb30401da53382089e93ca9.tar.gz
lombok-e3e8bb2e1dc4c9b0ffb30401da53382089e93ca9.tar.bz2
lombok-e3e8bb2e1dc4c9b0ffb30401da53382089e93ca9.zip
Fix for installation - now uses quotes instead of backslash-space, as backslash-space doesn't work in windows.
Diffstat (limited to 'src/installer/lombok')
-rw-r--r--src/installer/lombok/installer/netbeans/NetbeansLocation.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/installer/lombok/installer/netbeans/NetbeansLocation.java b/src/installer/lombok/installer/netbeans/NetbeansLocation.java
index 51acef3d..45aac274 100644
--- a/src/installer/lombok/installer/netbeans/NetbeansLocation.java
+++ b/src/installer/lombok/installer/netbeans/NetbeansLocation.java
@@ -83,9 +83,8 @@ public class NetbeansLocation extends IdeLocation {
}
private final String ID_CHARS = "(?:\\\\.|[^\"\\\\])*";
- private final String ID_CHARS_NS = "(?:\\\\.|[^\"\\\\ ])*";
private final Pattern JAVA_AGENT_LINE_MATCHER = Pattern.compile(
- "^\\s*netbeans_default_options\\s*=\\s*\"\\s*" + ID_CHARS + "(?<=[ \"])(-J-javaagent:" + ID_CHARS_NS + "lombok" + ID_CHARS_NS + "\\.jar)(?=[ \"])" + ID_CHARS +"\\s*\"\\s*(?:#.*)?$", Pattern.CASE_INSENSITIVE);
+ "^\\s*netbeans_default_options\\s*=\\s*\"\\s*" + ID_CHARS + "(?<=[ \"])(-J-javaagent:\\\\\"" + ID_CHARS + "lombok" + ID_CHARS + "\\.jar\\\\\")(?=[ \"])" + ID_CHARS +"\\s*\"\\s*(?:#.*)?$", Pattern.CASE_INSENSITIVE);
private final Pattern OPTIONS_LINE_MATCHER = Pattern.compile(
"^\\s*netbeans_default_options\\s*=\\s*\"\\s*" + ID_CHARS + "\\s*(\")\\s*(?:#.*)?$", Pattern.CASE_INSENSITIVE);
@@ -232,7 +231,7 @@ public class NetbeansLocation extends IdeLocation {
Matcher m = JAVA_AGENT_LINE_MATCHER.matcher(line);
if (m.matches()) {
newContents.append(line.substring(0, m.start(1)));
- newContents.append("-J-javaagent:" + escapePath(canonical(lombokJar)));
+ newContents.append("-J-javaagent:\\\"" + canonical(lombokJar) + "\\\"");
newContents.append(line.substring(m.end(1)));
newContents.append(OS_NEWLINE);
continue;
@@ -241,7 +240,7 @@ public class NetbeansLocation extends IdeLocation {
m = OPTIONS_LINE_MATCHER.matcher(line);
if (m.matches()) {
newContents.append(line.substring(0, m.start(1)));
- newContents.append(" ").append("-J-javaagent:" + escapePath(canonical(lombokJar)) +"\"");
+ newContents.append(" ").append("-J-javaagent:\\\"" + canonical(lombokJar) +"\\\"");
newContents.append(line.substring(m.end(1))).append(OS_NEWLINE);
continue;
}
@@ -272,7 +271,7 @@ public class NetbeansLocation extends IdeLocation {
}
return "If you start netbeans with custom parameters, you'll need to add:<br>" +
- "<code>-J-javaagent:" + escapePath(canonical(lombokJar)) + "</code><br>" +
+ "<code>-J-javaagent:\\\"" + canonical(lombokJar) + "\\\"</code><br>" +
"as parameter as well.";
}