Bracketeer: the Ultimate Bracket Plugin
Join the DZone community and get the full member experience.
Join For Freeif you are like me, then it is easy to miss a bracket or two in my source code. or i have tons of closing brackets at the end of a function, and it is hard to tell which one is which? eclipse comes with basic bracket support: you select/click a bracket, and it helps you to find the closing one. i was pretty happy about that, unless i saw a list of most popular eclipse plugin. one plugin stood out of the masses in the top 10 most popular new eclipse plugins review: bracketeer . that plugin exactly helps me to solve my problem: which bracket is which?
it would be really cool to know to which code block each ‘}’ belongs. and bracketeer can do this for me!
installation
to install the plugin, use the menu help > install new software and point the eclipse updater to following site:
http://chookapp.github.com/chookappupdatesite/
bracketeer comes with support for cdt (c/c++) and jdt (java). just install for what you have installed in your eclipse ide.
features
the plugins installs a new toolbar with 3 functions:
- it shows matching brackets surrounding the cursor. i simply can place my cursor somewhere in the code, and it shows me the different levels of surrounding brackets in different color:
- it shows matching brackets while hovering over it. similar to the ‘cursor’, but only if hover with the mouse cursor. and it shows just the matching bracket:
- and this is the coolest thing of all! it shows hints in the editor view:
the really cool thing of the last features is that it does auto-commenting: it shows you the corresponding block condition in the source view, *without* touching the source code.
plus it allows you as well to use a hyperlink to the corresponding block: simply press ctrl and use your mouse to jump to the block other end:
plus it informs me about unpaired/wrong brackets too:
cool, eh?
preferences
bracketeer has as well rich settings where you can configure the look and feel of it:
happy bracketeering
Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments