netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Brackets highlighting not working inside JDK15 String text block

Open AdrienAngeldust opened this issue 3 years ago • 0 comments

Apache NetBeans version

Apache NetBeans 14

What happened

JDK15 introduced text blocks as no longer a preview feature. Text blocks itself works fine in NetBeans, however bracket highlighting is broken and not working properly as its unable to find the ending brackets and only highlights the first.

Bracket highlighting works fine for multiline String and StringBuilder, but not inside JDK15 Text Block

Broken Text Block Bracket Highlighting: brokenTextBlockHighlight

Working multiline String Bracket Highlighting workingMultilineStringHighligh

Working StringBuilder Bracket Highlighting workingStringBuilderHighlight

How to reproduce

Create any JDK15 String text block variable using """ containing pair of brackets "(", ")" and click on first one. Only first one is highlighted and unable to find ending bracket brokenTextBlockHighlight .

Did this work correctly in an earlier version?

No / Don't know

Operating System

MacOS Monterey 12.4

JDK

OpenJDK 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

AdrienAngeldust avatar Aug 09 '22 11:08 AdrienAngeldust