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.

Bug 237632

Summary: Apache .conf matching parentheses/parenthesis/parens no longer highlighted in 7.4
Product: editor Reporter: webmaestro
Component: -- Other --Assignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal CC: tmysik
Priority: P2 Keywords: REGRESSION
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: NetBeans 3.3 Matching Parentheses highlighting
Sample Apache Conf file
Sample INI file

Description webmaestro 2013-10-24 17:33:49 UTC
Created attachment 141530 [details]
NetBeans 3.3 Matching Parentheses highlighting

The parentheses are no longer highlighted in Apache *.conf files, like it was in NetBeans 7.3 (see attached screenshot of 7.3).

I use this a lot, when I'm creating the Apache pseudo-regex for RewriteRules like this one:

  RewriteRule ^/(bas(e|ket)ball|angels|dodgers|clippers|lakers|hockey|ducks|nfl|college(sport)?s?|ncaa|uci|ucla|usc)/?$ /common/go/index.php?go=$1 [R=permanent,L]

My apologies for the extra noise if this is a just setting I haven't found in NetBeans 7.4!
Comment 1 webmaestro 2013-10-24 17:37:09 UTC
System information

OS: Mac OS X Mavericks 10.9
JDK:

$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
Comment 2 Tomas Mysik 2016-08-03 07:42:08 UTC
So, I tried to investigate it and the "cause" is:

- in NB 7.3.1, LegacyEssMatcher returns null from createMatcher() method;
- in NB dev, LegacyEssMatcher does not return null from createMatcher() method (the SyntaxSupport class is instance of CslEditorKit$1, see line 152);

Of course, I have no idea whether this is the real cause but at least something where to start debugging, I hope :)

Will attach 2 sample files.

Thanks.
Comment 3 Tomas Mysik 2016-08-03 07:43:03 UTC
Created attachment 161546 [details]
Sample Apache Conf file
Comment 4 Tomas Mysik 2016-08-03 07:43:32 UTC
Created attachment 161547 [details]
Sample INI file
Comment 5 webmaestro 2016-08-04 04:34:33 UTC
Thanks for following up on this! It's been driving me batty for years!
Comment 6 Tomas Mysik 2016-08-04 05:17:41 UTC
(In reply to webmaestro from comment #5)
> Thanks for following up on this! It's been driving me batty for years!

We know, really sorry for that! We will do our best and hopefully this issue will be fixed soon.

Thanks.
Comment 7 webmaestro 2016-08-04 13:26:15 UTC
Unconditionally forgiven! ;-)

Have a great day!
Comment 8 Tomas Mysik 2016-11-14 11:30:26 UTC
Sváťo, do you think this could be part of the Patch 1 for NB 8.2?

Thanks!
Comment 9 Svata Dedic 2017-03-30 10:30:58 UTC
Hm, I could not determine what the feature was working before, but CSL sort of damages the backward-compatible bridge from brace matching API to ExtSyntaxSupport; I could probably do better, but I decided to "fix" the issue by sending back a special value when CSL actually does not have a handler for brace matching. 
The editor recognizes it *specifically* if coming from the compatibility bridge and delegates to the next handler.
Comment 10 Svata Dedic 2017-03-30 10:33:57 UTC
Fixed in jet-main#a7edd15593c5
Comment 11 Quality Engineering 2017-04-02 02:36:37 UTC
Integrated into 'main-silver', will be available in build *201704020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a7edd15593c5
User: Svata Dedic <sdedic@netbeans.org>
Log: #237632: allow additional brace matching handlers if CSL does not recognize braces