Bracketeer: the ultimate bracket plugin


If 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?

Brackets

Brackets

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 Installation

Bracketeer Installation

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:

Bracketeer Toolbar

Bracketeer Toolbar

  1. 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:

    Show matching cursor brackets

    Show matching cursor brackets

  2. 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:

    Matching Brackets with Mouse Hover

    Matching Brackets with Mouse Hover

  3. And this is the coolest thing of all! It shows hints in the editor view:

    Bracketeer Hints

    Bracketeer Hints

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:

Hyperlink with Bracketeer

Hyperlink with Bracketeer

Plus it informs me about unpaired/wrong brackets too:

Wrong Brackets

Wrong Brackets

Cool, eh?

Preferences

Bracketeer has as well rich settings where you can configure the look and feel of it:

Bracketeer Preferences

Bracketeer Preferences

Happy Bracketeering :-)

About these ads

5 thoughts on “Bracketeer: the ultimate bracket plugin

  1. awesome plugin! i was finally able to style my eclipse closing brackets / braces like netbeans already styles brackets by default

  2. Could it be used for files that are not ending in a .cpp or .h extension? I am interested to use it for any extension file.
    thanks

    • Bracketeer is for CDT (C/C++) and JDT (Java) development. I tried it with .txt (text files), and it is not working on these files. As I believe it depends on the Eclipse indexer and parser, it only works on files which are supported by the Eclipse parser (e.g. CDT and JDT). So if you have your very own files, then you probably need to extend the Bracketeer code.

  3. Pingback: Constructing a Classroom IDE with Eclipse for ARM | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s