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 132172 - Braces matching improvements
Summary: Braces matching improvements
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: API
Depends on:
Blocks: 124897
  Show dependency tree
 
Reported: 2008-04-07 11:19 UTC by Vitezslav Stejskal
Modified: 2013-02-19 21:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitezslav Stejskal 2008-04-07 11:19:11 UTC
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.
Comment 1 Vitezslav Stejskal 2008-04-07 11:20:48 UTC
These usecases were described and requested by Marek. Marku please add more details or even other usesaces if you need.
Thanks
Comment 2 Marek Fukala 2008-04-28 09:37:54 UTC
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.
Comment 3 Vitezslav Stejskal 2008-04-28 15:07:45 UTC
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.
Comment 4 Jan Becicka 2008-07-30 14:18:01 UTC
It currently does not block any P2. It is rather enhancement.