junichi11 edited a comment on pull request #2960: URL: https://github.com/apache/netbeans/pull/2960#issuecomment-842273734
URL is not highlighted. #### Before:  #### After:  #### Exception: ``` java.lang.UnsupportedOperationException: Not supported yet. at org.netbeans.modules.editor.url.HighlightURLs$3.subSequence(HighlightURLs.java:217) at java.util.regex.Matcher.getSubSequence(Matcher.java:1294) at java.util.regex.Matcher.group(Matcher.java:541) at org.netbeans.modules.editor.url.Parser.recognizeURLsREBased(Parser.java:44) at org.netbeans.modules.editor.url.Parser.recognizeURLs(Parser.java:36) at org.netbeans.modules.editor.url.HighlightURLs.run(HighlightURLs.java:222) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) Caused: org.openide.util.RequestProcessor$FastItem: task failed due to ``` Maybe `recognizeURLs()` is called many times, I suppose. Is the performance problem OK although I can be wrong? (about using `URL_PATTERN.matcher(text)` instead) *Update:* Actually, It seems that the handwritten parser is so fast. See: https://github.com/apache/netbeans/blob/e87eb25de9e788832b8459165031b32936152a2e/ide/editor/test/unit/src/org/netbeans/modules/editor/url/ParserTest.java#L94-L119 Test Result: times=2049 vs. 19441 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
