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.
The braces matching infrastructure does not support well some usecases that are common (required) in tag-based editors. We should improve the infrastructure to provide better support in these situations. Here are the usecases: 1. In certain situations a tag based language may not require tags to be well-formed. In this case there may be tags for which a corresponding closing tag is optional. For example the <meta> tag in an HTML document header. Currently the infrastructure accepts two results from findMatches() - a list of matching regions or nothing (null, empty list). In the first case the origin is highlighted with a color for successful match. In the latter case it is marked with a color for mismatch (or no match). In case when the closing tag is optional there is nothing to return from findMatches(), but the origin should not be marked with the no match color. 2. Tags may contain attributes and may in fact be quite long (even spanning several lines). It is desirable to mark only the '<tag' beginning of the tag instead of the whole area between '<' and '>'. However, the navigation (ctrl+[, ctrl+shift+[) should be done between the closing '>' of the tag and the opening '<' of the tag's matching counterpart. In other words the areas identified by matchers may be different from what the matcher would like to highlight.
These usecases were described and requested by Marek. Marku please add more details or even other usesaces if you need. Thanks
The cases are described in the original issue 130512. It is very important for me to somehow resolve the infrastructure problems since the functionality is now limited and there are bugs like 134046 which doesn't seem to be resolvable on my side.
See also issue #131284. 3. Another improvement is to allow push model for the API. Just briefly: in this model clients would not register BracesMatcher implementations, but called a method with the list of matching areas. 4. This API is basically the same to what java (and others) uses for mark occurences. We should make it possible to reuse it for mark occurences.
It currently does not block any P2. It is rather enhancement.