diff options
3 files changed, 8 insertions, 8 deletions
diff --git a/src/installer/lombok/installer/netbeans/NetbeansFinder.java b/src/installer/lombok/installer/netbeans/NetbeansFinder.java index 5186d639..16dbf251 100644 --- a/src/installer/lombok/installer/netbeans/NetbeansFinder.java +++ b/src/installer/lombok/installer/netbeans/NetbeansFinder.java @@ -101,7 +101,7 @@ public class NetbeansFinder extends IdeFinder { /** Checks if the provided directory contains 'netbeans.exe', and if so, returns the directory, otherwise null. */ private String findNetbeansOnWindows1(File dir) { - if (new File(dir, "netbeans.exe").isFile()) return dir.getAbsolutePath(); + if (new File(dir, "bin/netbeans.exe").isFile()) return dir.getAbsolutePath(); return null; } @@ -165,7 +165,7 @@ public class NetbeansFinder extends IdeFinder { if (!d.isDirectory()) return; for (File f : d.listFiles()) { if (f.isDirectory() && f.getName().toLowerCase().contains("netbeans")) { - File possible = new File(f, "bin/netbeans.exe"); + File possible = new File(f, "bin/netbeans"); if (possible.exists()) guesses.add(possible.getAbsolutePath()); } } diff --git a/src/installer/lombok/installer/netbeans/NetbeansLocation.java b/src/installer/lombok/installer/netbeans/NetbeansLocation.java index 45aac274..ab403170 100644 --- a/src/installer/lombok/installer/netbeans/NetbeansLocation.java +++ b/src/installer/lombok/installer/netbeans/NetbeansLocation.java @@ -84,7 +84,7 @@ public class NetbeansLocation extends IdeLocation { private final String ID_CHARS = "(?:\\\\.|[^\"\\\\])*"; private final Pattern JAVA_AGENT_LINE_MATCHER = Pattern.compile( - "^\\s*netbeans_default_options\\s*=\\s*\"\\s*" + ID_CHARS + "(?<=[ \"])(-J-javaagent:\\\\\"" + ID_CHARS + "lombok" + ID_CHARS + "\\.jar\\\\\")(?=[ \"])" + ID_CHARS +"\\s*\"\\s*(?:#.*)?$", Pattern.CASE_INSENSITIVE); + "^\\s*netbeans_default_options\\s*=\\s*\"\\s*" + ID_CHARS + "(?<=[ \"])(-J-javaagent:\\\\\".*lombok.*\\.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); @@ -240,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:\\\"" + canonical(lombokJar) +"\\\""); + newContents.append(" ").append("-J-javaagent:\\\"" + canonical(lombokJar) +"\\\"\""); newContents.append(line.substring(m.end(1))).append(OS_NEWLINE); continue; } diff --git a/src/installer/lombok/installer/netbeans/NetbeansLocationProvider.java b/src/installer/lombok/installer/netbeans/NetbeansLocationProvider.java index 1bc699f1..68a00756 100644 --- a/src/installer/lombok/installer/netbeans/NetbeansLocationProvider.java +++ b/src/installer/lombok/installer/netbeans/NetbeansLocationProvider.java @@ -61,11 +61,11 @@ public class NetbeansLocationProvider implements IdeLocationProvider { if (conf.exists()) return new NetbeansLocation(path, conf); } - File f = new File(p, "netbeans"); + File f = new File(p, "bin/netbeans"); if (f.isFile()) return findNetbeansConfFromExe(f, 0); - f = new File(p, "netbeans.exe"); + f = new File(p, "bin/netbeans.exe"); if (f.isFile()) return findNetbeansConfFromExe(f, 0); - f = new File(p, "netbeans.conf"); + f = new File(p, "etc/netbeans.conf"); if (f.isFile()) return new NetbeansLocation(canonical(f.getParentFile().getParentFile()), f); } @@ -116,7 +116,7 @@ public class NetbeansLocationProvider implements IdeLocationProvider { case MAC_OS_X: return Pattern.compile("^(netbeans|netbeans\\.conf|NetBeans.*\\.app)$", Pattern.CASE_INSENSITIVE); case WINDOWS: - return Pattern.compile("^(netbeans\\.exe|netbeans\\.ini)$", Pattern.CASE_INSENSITIVE); + return Pattern.compile("^(netbeans\\.exe|netbeans\\.conf)$", Pattern.CASE_INSENSITIVE); default: case UNIX: return Pattern.compile("^(netbeans|netbeans\\.conf)$", Pattern.CASE_INSENSITIVE); |