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.
MasterMatcher.findFactories(...) compares TokenHierarchy.get(document) with null but TokenHierarchy.get(document) is never null anymore (just look at the call chain, it will always return a valid object with the current codebase). This breaks braces matching for non-Lexer kits as TokenHierarchy.get(document) returns non-null but th.embeddedTokenSequences(offset, backward).isEmpty()==true and thus no factory is returned. The check should probably be: if (th.isActive()) { List<TokenSequence<?>> sequences = th.embeddedTokenSequences(offset, backward); ... This seems to fix the bug, ie. braces matching works again for my editor. I'm not entirely certain it is correct, but .isActive() seems to be used by org.netbeans.modules.editor.impl.highlighting.HLFactory to check for a lexer kit.
I see, I'll fix it. I think your fix is correct. IIRC the lexer behavior was changed some time ago and we went through the codebase and changed it. This must have slipped through somehow, sorry.
http://hg.netbeans.org/main/rev/8fa62a739a0a
Integrated into 'main-golden', available in NB_Trunk_Production #243 build Changeset: http://hg.netbeans.org/main/rev/8fa62a739a0a User: Vita Stejskal <vstejskal@netbeans.org> Log: #135167 (fixed): proper check for lexerified languages