Flash Builder and Grep Console (video)

Steve Warren has posted a video on using Grep Console in Flash Builder on his blog.

Posted in Grep Console | Tagged , , | Leave a comment

Eclipse, CMake and C++11

Getting C++11 to work with CMake is easy. Getting Eclipse to work with a CMake project is easy. Getting Eclipse to work with C++11 also seems to be relatively easy (there are plenty of guides on various wikis).

But getting all three to cooperate nicely is a bit trickier – or rather, the standard Eclipse way to configure C++11 support doesn’t work for CMake projects, and none of the guides I could find at first mentioned that.

It’s perfectly possible to work with a C++11 CMake project in Eclipse without any special settings. Compiling and running the code works fine (as the compiler gets its settings from the CMake config), but the code editor will keep mark various C++11 code bits as errors.

Fortunately, this Stack Overflow post shows how easy it is to fix this for Eclipse Kepler if you just know the right option to set. Simply create your Eclipse project with something like this:

cmake ../my_src_dir -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_VERSION=4.2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_ARG1=-std=c++11

The above is for a Linux Make project. For different platforms, change the -G option accordingly. The relevant bit is of course the CMAKE_CXX_COMPILER_ARG1 option.

Posted in C++11, CMake, Eclipse | Tagged , , | Leave a comment

Bugfix Release: Grep Console 3.5.1

Two bugs were introduced in version 3.5 and have been fixed in service release 3.5.1:

  • Old, close consoles would throw null pointer exceptions when the Grep View filter settings were changed
  • Even if notifications were disabled for an expression item, they would still be triggered when the item filtered lines to the Grep View

For installation instructions, please see here. As always, feedback is welcome.

Posted in Grep Console | Tagged , | Leave a comment

Eclipse 4.x tab font sizes in GTK

The Eclipse 4 branch introduced some notable visual changes compared to the previous 3.x releases, like a reliance on more whites than greys. While unexpected at first, most of these changes just take some getting used to. With the exception of the size of the tab title font, that is – on GTK in Linux, tabs are just huge:

Bad tabs (huge).Fortunately, there’s an easy remedy to be found on Stack Overflow. Eclipse’s design is now based on CSS files. For the GTK main layout, the file is $eclipse/plugins/org.eclipse.platform_4.*/css/e4_default_gtk.css, and the CSS responsible for the tab headers is .MPartStack.

A simple change to this class is sufficient to set the tab font size back to normal:

.MPartStack {
/*      font-size: 11;*/
        swt-simple: false;
        swt-mru-visible: false;

As you can see, it’s enough to simply comment out the font-size style to set the size back to normal:

Good tabs (normal).

Posted in Eclipse, Linux | Tagged , , | 2 Comments

Grep Console How-to #8: Notifications

Grep Console 3.5 introduced the notification feature, designed to give you feedback about key information in your Eclipse console even if Eclipse isn’t currently your active window. This article gives an overview of how to use notifications. If you’ve been using previous versions of Grep Console, you can also see the new tabbed interface on the expression dialogue for the first time.


Let’s say you have a test case which runs for a while before producing a temporary output file. The path to the output file is written to the console so you can open and verify it. For exactly this situation at work, I’ve been using Grep Console’s link feature to make the file paths clickable and directly view the PDF files created by my test cases.

Our example output looks like this:

Generating output...
Output is ready: /home/grepconsole/temp/demo.pdf

We want to highlight the second line, and turn the path into a link we can click to view the PDF. In addition to that, we want to set up notifications triggered by this line.

Styles and Links

We start by creating a new expression item, using the following expression to capture the path part of all “Output is ready” lines:

\QOutput is ready: \E(\S+)

All other fields on the General tab can be left on the default settings for our purpose. On the Styles & Links tab, we assign a highlight style to the line and a further highlight to the capture group:

We configure highlights for the line and the file path, turn the file path into a link and rename the capture group to "file".

As you can see, we’ve also renamed the capture group to “file” for easier reference (see below in the notifications section) and added a File link to it. The link simply specifies “{group}” as the file path (as we’ve renamed the capture group, we could just as well have specified “{file}” here). This turns the path portion of our output line into a clickable link which will open the referenced file.


On the Notifications tab, we configure a popup notification to display a popup message, and a sound notification to play when our test output is ready:

We configure a popup and a sound notification.

The popup notification is set up to use the fixed title “Output” and the message “Output is ready:” followed by the path from our file capture group (which we named “file” in the previous step). Also, we assign the same link action to the notification which we already used in the previous step (you can simply use copy & paste to assign the same link here). Setting this link means that when we click on the popup message, the referenced file will open directly. If we don’t set a link, we can still click on the message – it will simply activate the Eclipse window in this case.

The sound notification is straightforward: We’ve assigned a “click.wav” sound. This sound will play as soon as the output line is written to the console.

Also on this tab, we could specify an autostart action, which is exactly the same feature described in How To #6: Autostart Links. As of Grep Console version 3.5, autostart links have been renamed to autostart actions and moved to the notifications tab.


And this is what it looks like when our demo application finishes:

The popup message can be seen on the lower right.

To the lower right you can see the popup message which you can click to open the output file. Even if your Eclipse window is minimised or in the background, this message will pop up as soon as our demo file is ready. The message will automatically fade out and disappear after a few seconds, unless you move the mouse pointer inside the popup, which will keep it alive until the pointer leaves the popup again.

Posted in Grep Console | Tagged , | Leave a comment

New Grep Console release: 3.5

Three months after the previous release, a new version of Grep Console is ready. Version 3.5 introduces notifications and GUI improvements.


  • Popup notifications – Expressions can now trigger popup notifications which display messages based on the matched console lines even when Eclipse is not currently the active window. An action which is triggered when the user clicks the popup can be configured.
  • Sound notifications – Expressions can now play sounds when they are matched. Suggested by Sergiy Beley.


  • Tabbed expression dialogue – The expression dialogue now features a tabbed interface to provide a better overview of the available settings.
  • GUI improvements – Various user interface details were changed to be consistent with the official Eclipse guidelines. Reported by Sebastian Davids.

Please note that this version also introduces a change in terminology: “Links” are now referred to as “actions” whenever a behaviour is described. The clickable links in the console output are still called links, to which various actions can be assigned.

As usual, thanks go to everyone who sent suggestions and bug reports to help continue improving Grep Console.

For installation instructions, please see here. As always, feedback is welcome.

Donate Button with Credit Cards

Posted in Grep Console | Tagged , | Leave a comment

Grep Console Donation Button

I’ve added a donation button to the sidebar on the right side on the Grep Console pages. If you like the plug-in, you can use this button to make a donation (of an amount of your choosing) to encourage me to keep making updates.

Please understand that donations are entirely voluntary and I will not consider them as binding obligations to make specific updates. I have other projects I’m interested in as well, and I am not planning on abandoning those. That said, I have been making updates to Grep Console in the past, and plan on continuing doing so every now and then. A donation can only help fuel my motivation.

And just in case you absolutely want to donate but are too lazy to go to the Grep Console page, I’m adding the button right here to the end of this post as well:

Donate Button with Credit Cards

Posted in Grep Console | Tagged , | Leave a comment

My first Android app: n Tile Puzzle

So I released my first Android app. Nothing special, just a version of the same type of sliding puzzle that’s already all over the Google Play™ store. It started out as a little project I had no intention of actually publishing, but once it was finished it seemed a good test project to have a first look at how the Google Play system works, so there it is.

Get it on Google Play™

The full source code is available under the GNU GPL on the project page. Entirely undocumented, but most of it should be simple enough.

Google Play is a trademark of Google Inc.

Posted in Android | Tagged , | 1 Comment

New Grep Console release: 3.4

After the previous Grep Console releases, I’ve received a lot of comments and suggestions. Version 3.4 incorporates these new features and is now ready for download.


  • Quick expressions – Expression items may now have a quick expression which is tested before the main expression is evaluated.
  • Base paths for file links – A base path for relative file links can now be specified. By default, the project’s root directory is used. Suggested by Angel Ezquerra.
  • http:// prefix for URL links – URLs without a schema prefix can now be used in URL links. They will automatically be prefixed with “http://”. Suggested by Angel Ezquerra.
  • Offsets for file and Java links – For file and Java links, an optional character offset can be specified to position the cursor at a specific column in the editor. Suggested by Peter Štibraný.
  • Eclipse variables in link pattern fields – Pattern strings in link configurations can reference use Eclipse variables (as used in the arguments tab of the launch configuration dialogue). Suggested by Angel Ezquerra.
  • Custom names for expression groups – Groups of expression items can now be assigned custom names. These names can be used in link pattern strings. Suggested by Angel Ezquerra.
  • Configurable colours in the Grep View – By default, the Grep View now uses the same colours as the Eclipse console. These colours can be changed in the preferences. Suggested by Angel Ezquerra.
  • Configurable link modifier key – On Mac systems, the link modifier key is now Command instead of Ctrl. The modifier key can be changed in the preferences. Suggested by Peter Štibraný.

Bug fixes:

  • Null pointer exception when clicking on style assignment for a rewrite group

Special thanks go to everyone who has been sending me feedback and ideas, especially Angel Ezquerra, who has provided the ideas for many of the new features added to recent releases.

For installation instructions, please see here. As always, feedback is welcome.

Posted in Grep Console | Tagged , | Leave a comment

Bugfix Release: Grep Console 3.3.1

Version 3.3.1 of Grep Console is out, fixing a bug which prevented links assigned to whole lines from working. Thanks to Angel Ezquerra for reporting this bug. CTRL key handling for links was also improved.

For installation instructions, please see here. As always, feedback is welcome.

Posted in Grep Console | Tagged , | Leave a comment