Bug 1450 : Bracket idenfication {} is not aware of comments //
Last modified: 2010-04-09 04:30




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P3
Severity:
normal

 

Reporter:
jeffg
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-01-28 18:18
When you place your mouse "|" next to a bracket "{" it identifies the lower
bracket "}" - Great feature. However, this does not work correctly if you
have a comment that contains a bracket "//}". The identification system
should ignore brackets if they are commented. In the code below, placing
the mouse next to the first bracket should place the identifier on the last
bracket (the end of the first if statement), but it doesn't. It highlights
the end of the second if statement, misidentifying the close of the bracket
because the commented bracket is confusing it.

if (1 == 1) {
if (2 == 2) {
//Some old code }
}
}

Processing 1.0.9
Mac OSX 10.6.2
Additional Comment #1 From fry 2010-01-28 19:19
yeah, the editor ain't so smart.
Additional Comment #2 From MrFeinberg 2010-04-08 19:24
Ta-dahhhhhh.

This code is even smarter than Eclipse, which doesn't take character
constants into account. Boo-yah, Eclipse.
Additional Comment #3 From fry 2010-04-09 04:30
fantastic, thanks!