Community
Participate
Working Groups
Hi, the automatic bracket matching (i.e. matching bracket being highlighted) only works for me in some situations. As an example - in this b3 text: repository svn MyRepo { connection : "http://abc.org"; } resolution { select-first { repository MyRepo { path : "/features" ; } } } the matching does not work for the outermost brackets. (In fact, this part was the only part where it actually managed to match brackets). Wonders if the bracket matching is done with aid from the grammar and that the problems occur because of backtracking... Seems like the matching of brackets should be done at the lexical level so should not really be affected by a complicated grammar. The matching also breaks if there are syntax errors: Here matching works (using | to highlight what it matches, and what I expect: select-first { repository MyRepo {| path : "features" ; }| } But not here: select-first {| repository MyRepo path : "features" ; }| } I assume it is supposed to really show the lexical matching as this is very useful when there are matching errors. Problem can be observed with latest b3, and input like: function foo() { }
I think this is related to Unordered Group issues (bug 315581, bug 315335) since matching brackets works after I modified the grammar to not use Unordered Groups (the use of the unordered group is described in the two issues).
We should rewrite bracket matching such that it doesn't rely on tokens but on simple characters and strings. Also we should have something like partitions, i.e. handling comments and string literals separately. Rescheduling for Indigo
Bracket matching is now based on JFace's DefaultCharacterPairMatcher.
Closing bug which were set to RESOLVED before Eclipse Neon.0.