aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How can I find brackets match in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How can I find brackets match in eclipse" Watch "How can I find brackets match in eclipse" New topic
Author

How can I find brackets match in eclipse

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hello all
how can I find where I miss closing or opening brackets in eclipse?
something more visual then what I have with my mouse over
do I need plug in or there is somekind of building option?
Dianne Doss
Greenhorn

Joined: Aug 18, 2006
Posts: 17
What version of Eclipse are you using?
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
ObjectWeb Lomboz for JavaEE Development
Version: 3.1.2
Amol Fuke
Ranch Hand

Joined: Apr 08, 2005
Posts: 129
Just place a curser near the opening bracket and you will see a gray outline to the matching closing bracket.
Other option is just double click on the opening bracket and your code will be selected upto the closing bracket.


"There are no mistakes, only lessons"
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
The following is from a "Tip of the Week" I authored for our developers:

How do I find a matching brace for a code block? ´┐Ż Eclipse offer several mechanisms for finding the matching brace for an if / for / do-while / while / try-catch code block. For all of these, you must place your cursor immediately after the opening or closing brace that you wish to find the matching brace for. If you place your cursor before the opening or closing brace, the instructions that follow will not work!

The first way to find a matching brace is to place your cursor after an opening or closing brace then double-click. The Java editor will highlight all of the lines between the opening and closing braces.

The second way is to place your cursor after an opening or closing brace then press Ctrl+Shift+P or, alternately, select Navigate >> Go To >> Matching Bracket from the menu bar. The Java editor will reposition the cursor to immediately after the matching closing or opening brace. This mechanism allows you to toggle the position of the cursor between the opening and closing braces of a code block.

The third way requires configuration of your Preferences. Select Window >> Preferences´┐Ż >> Java >> Editor. Select Highlight matching brackets. Optionally, you may select Matching brackets highlight from the Appearance color options and click on Color to choose a highlight color. It recommended that you change the color because the default (gray) is difficult to see. Click Apply then OK.

Once configured, place your cursor after an opening or closing brace. The Java editor will draw a box around the matching closing or opening brace in the color you selected. Note that, if both code block braces are not visible in the Java editor at the same time, you must use the scroll bar to find the matching closing or opening brace.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I find brackets match in eclipse