A Few Words on the State of Grep Console Development

It’s been a while since I’ve posted an update or new information on Grep Console. There are two main reasons for that.

First, I have several other projects I’m interested in working on, so as long as Grep Console isn’t in immediate need of maintenance, I try to spend my time and energy on those.

However, over the last few months, I’ve become somewhat unhappy with some points in Grep Console which I’d like to improve. Also, I’ve received a couple of suggestions for features and improvements which would be nice to have in a new version. Here’s where the second reason comes into play.

Several of these features simply aren’t compatible with the current structure of the Grep Console code base. The only way I can see to add them is to reimplement the whole thing, which of course takes considerably more time, which in turn distracts me even more from my other projects.

Nevertheless, I’ve decided a while ago to do this, and have been working on and off on it over the summer. I keep getting distracted by work and other things, so I haven’t yet gotten as far as I’d like. But since I’ve planned to write this post for quite some time, and have also neglected to reply to emails regarding Grep Console during this time until I had all the information collected and ready to post, I think it’s time for a status update.

Please excuse my non-replies to your reports and suggestions. If you sent me an email, forgive me if I haven’t replied; I wanted to wait until I actually had something to report, which turned out to take considerably longer than expected. I hope all questions are covered in this post. Feel free to comment if you have further questions or suggestions.

Features

A number of features may be part of the new release, partly based on my own thoughts about what wasn’t quite right with previous versions, and partly based on your suggestions. Not all of these features might actually make into the release, depending on how complex they turn out to be (Eclipse’s APIs can be a serious handicap at times).

  • Expression sets
  • Line filtering directly in the console view
  • Support for multiple console views
  • Highlighting also in text editors
  • Expression conditions
  • Dynamic colours

Expression Sets

The main idea here is to make Grep Console quicker and easier to use if you have a lot of projects in your Eclipse workspace. I’ve found that I tend to amass expression items until the list gets too confusing to maintain. At that point, I just start logging my debug messages on the warn, error and fatal levels so they’re caught my my default expressions. Obviously not what I had in mind when I created Grep Console, and it messes up my logs and requires me to go through all my log statements before a release.

With expression sets, the actual expression items will still be held in one large pool of folders and items. However, expression sets can be created which contain only those items which should be active at a given time. These expression sets can be named and also organised in folders, and can be simply switched with a drop down menu in the console view. This also makes it possible to switch between two or more expression sets on the fly.

Line Filtering Directly in the Console View

When I wrote the first version of Grep Console, the initial idea was to simply filter out certain lines from the console view. When this turned out to be (much more) complicated than I’d hoped, I switched to highlighting matching lines instead, which was pretty much directly supported by Eclipse.

The Grep View introduced in a later version was my first attempt at actually filtering lines. It’s rather cumbersome to use, though – in fact, I rarely use it myself. What I really need is what my original idea was: Filtering right there in the console view.

This is also one of the reasons why the old code base won’t do anymore: So far, Grep Console is mostly based on Eclipse’s line listeners, which can change the style of individual console lines as they are displayed. But for actual filtering, I have to directly change the console model whenever new lines are logged.

After lots of playing and hacking with the Eclipse console code, I have what seems to be a working prototype of this. It will be one of the central features of the new version, and it can be toggled quickly with a drop down menu in the console view.

Support for Multiple Console Views

This feature was requested a while ago and isn’t possible with the current code base, which relies too extensively on singletons. Since much of Grep Console’s functionality is invoked from listeners to Eclipse events, it’s sometimes pretty convoluted to get to a global registry or console settings without singletons, but the new version should be ready for this.

Highlighting Also in Text Editors

Also a requested features, and again I have a working (if rough) prototype. Obviously, line filtering and events like popup notifications don’t make a much sense in this context, but line highlighting does, and works in my current development version, more or less. I still need to get a grip on Eclipse’s editor updates (Eclipse often only refreshes part of the editor view, leaving the rest out of date with the new styles) and find a way to smoothly integrate the necessary controls in the editor GUI.

Expression Conditions

These will allow expression items to influence each other, e.g. to have three items A, B and C, where A and B match the beginning and end of a certain block in your console output, and C is to be used on the lines in between, but not on anything outside that block.

For this feature, expression items will be able to set variables depending on the lines they match, and other items can use conditions on these items to determine whether they are active.

This is another feature that can only work with the new code base, because it requires Grep Console to analyse every line in order to determine which items should be active for a new line, something that can’t be done with the existing code which only reacts to lines as they are displayed.

What makes it more tricky is to determine how simple/complex defining these conditions and variable assignments should be for the feature to make sense without the code to get more complicated than necessary.

Dynamic Colours

Another requested feature, and one I’m not yet sure how to solve, more from a GUI standpoint than from the model or logic code. The idea is to style a line not using the colours from a predefined style, but instead to take the colours from the strings captured by the line’s regular expression.

Release Date

Unknown. It will be ready when it’s ready, which is a boring and clichéd thing to say, but the only promise I can make at this point. I was hoping development would go faster than it has so far, but perhaps this update will also help me get more focused and ignore the distractions better. I’d like to get this ready sooner rather than later, not least because I’d like to get back to my other projects.

Icons

A few users have mentioned that the current icon is too non-specific and can look like an error indicator. I’d be happy to switch to a new icon with the new version, the only problem is: The current icon presents the extent of my skills with modern graphic tools. I used to be much better in the low res days of pixel graphics, but my Gimp skills are basic at best (and my Photoshop skills are non-existent).

If anyone wants a new icon enough to design it yourself and contribute it to the project, I’ll gladly accept it (if I like it and I think it represents Grep Console well), and give you full credit of course.

Otherwise, we’ll all just have to keep living with the current icon.

Conclusion

Long story short, a new version is coming, with some (I believe) exciting features, but it’s coming slowly. I hope this status update answers any questions you may have for now. If not, feel free to post in the comments below.

This entry was posted in Grep Console and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *