3.12. Finding the Matching Brace
Problem
Your code is getting long, and it’s hard to find the closing curly brace matching an opening brace, or vice versa.
Solution
Select the opening or closing brace and press Ctrl-Shift-P (or select Navigate→ Go To→ Matching Bracket).
Discussion
This is a useful tip for long code listings. To match an opening brace with the corresponding closing brace, just select the opening brace and press Ctrl-Shift-P. Eclipse will highlight the line with the closing brace.
Tip
You also can double-click before an opening or after a closing brace, which selects the text between the two braces automatically, thereby enabling you to locate the closing brace quickly. This technique works not only with braces, but also with parentheses.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access