Bug 156426 - [navigation] Sometimes braces matching not working in Eclipse
Summary: [navigation] Sometimes braces matching not working in Eclipse
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Christian Plesner Hansen CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 149520
Blocks:
  Show dependency tree
 
Reported: 2006-09-06 15:52 EDT by Aaron Ferguson CLA
Modified: 2006-09-07 11:09 EDT (History)
1 user (show)

See Also:


Attachments
Fix (3.33 KB, patch)
2006-09-07 08:33 EDT, Christian Plesner Hansen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Ferguson CLA 2006-09-06 15:52:15 EDT
Sometimes closing braces are not highlighted in Eclipse when the cursor is moved to one closing brace.  This seems to happen in long code segments where the other brace is off screen.  For example, in the replaceItem method in ContributionManager the opposing brace is not highlighted.

AF
Comment 1 Dani Megert CLA 2006-09-07 03:22:21 EDT
Can reproduce using I20060905-1250 with ContributionManager imported from said build.
Comment 2 Dani Megert CLA 2006-09-07 03:35:54 EDT
This has been introduced by fixing bug 149520.

Christian, can you take a look at that for M2? This means that your version of the JavaPairMatcher, the DefaultCharacterPairMatcher or both have a bug.

I reverted the JavaPairMatcher for now.
Comment 3 Dani Megert CLA 2006-09-07 03:36:53 EDT
NOTE: an additional test catching this would be great.
Comment 4 Christian Plesner Hansen CLA 2006-09-07 07:09:04 EDT
Darn.  I'll fix this.
Comment 5 Christian Plesner Hansen CLA 2006-09-07 08:33:12 EDT
Created attachment 49599 [details]
Fix

The attached patch should fix the problem.  It turns out that the new matcher didn't handle unmatched characters well, for instance the "unmatched" angle bracket in '(x < y)'.
Comment 6 Dani Megert CLA 2006-09-07 11:09:02 EDT
Released patch to HEAD.

Thanks for the quick response.