Recipe 3.12 Finding the Matching Brace

     

Recipe 3.12 Finding the Matching Brace

3.12.1 Problem

Your code is getting long, and it's hard to find the closing curly brace matching an opening brace, or vice versa.

3.12.2 Solution

Select the opening or closing brace and press Ctrl-Shift-P (or select Navigate Go To Matching Bracket).

3.12.3 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.

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.




Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net