This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Netbeans saves backup file with a ~ extension, e the file Foo.java becomes Foo.java~ . Therefore, Eoo.java would get backed up as Eoo.java~. The file will have to be ignored; however, the path to the file c:\foo\bar\Eoo.java~ will break the usage of \\Q and \\E in the regex. Below is the stacktrace. java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index ... \QD:\JDevelop\LocalCC\FooProject\src\com\foo\Eoo.java~\E ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.escape(Pattern.java:2177) at java.util.regex.Pattern.atom(Pattern.java:1952) at java.util.regex.Pattern.sequence(Pattern.java:1885) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at org.netbeans.modules.clearcase.ClearcaseModuleConfig.toPattern(ClearcaseModuleConfig.java:105) at org.netbeans.modules.clearcase.ClearcaseModuleConfig.setIgnored(ClearcaseModuleConfig.java:80) at org.netbeans.modules.clearcase.FileStatusCache.isIgnored(FileStatusCache.java:494) at org.netbeans.modules.clearcase.FileStatusCache.createFileInformation(FileStatusCache.java:446) at org.netbeans.modules.clearcase.FileStatusCache.refresh(FileStatusCache.java:371) at org.netbeans.modules.clearcase.FileStatusCache.refresh(FileStatusCache.java:288) at org.netbeans.modules.clearcase.FileStatusCache.access$100(FileStatusCache.java:70) at org.netbeans.modules.clearcase.FileStatusCache$1.run(FileStatusCache.java:516) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
I really tried exporting a patch just for this file through NetBeans, but I'm totally baffled on how to do that, I get an export diff on a whole bunch of files that I don't care about. I would appreciate a tip on how to export a diff for a single file.. Anyway.. the fix is to replace : private static Pattern toPattern(File file) { String filePath = file.getAbsolutePath(); return Pattern.compile("\\Q" + filePath + "\\E"); } with private static Pattern toPattern(File file) { String filePath = file.getAbsolutePath(); return Pattern.compile(Pattern.quote(filePath)); } And the exception disappears.
Fixing pattern conversion, thanks for the patch. 4ef4926c746c