Linux bug fixed: Graphrex 0.54

Thanks to a report direct from Per, we found out about a bug under Linux that was causing spurious FileNotFound errors. We fixed that in this new version 0.54. Keep those bug reports coming!

Posted in Uncategorized | Comments Off  

Another bug fix: Graphrex 0.5.3

This version fixes a bug in the drawing of Alternatives and Repetition figures that appeared with Eclipse v3.7 (Indigo). Thanks go to ‘Chief37′ who reported it in the forum.

Posted in Uncategorized | Comments Off  

More bug fixes: Graphrex 0.5.2

Graphrex 0.5.2 is another bug fix release. To all those who contacted us to report bugs and wishlist items: thank you. Please use the forums to provide this kind of feedback which helps to guide our development priorities.

Bug Fixes

  • Bracket matching in the regex text editor treated any sequence of brackets following an escape character as being escaped instead of just the first one.
  • After performing Save As it was not possible to re-open the original Graphrex diagram until the new one had been closed.
  • When zooming out, scroll bars appeared within group boxes and around paths in Alternatives nodes.
  • In the diagram, zooming in or out caused drawing errors at some magnifications.
Posted in Uncategorized | Comments Off  

Graphrex 0.5.1: bug fix release

Graphrex 0.5.1 is a bug fix release. It fixes problems with some of the new features in Graphrex 0.5. We urge all users to install this update.

Bug fixes

  • A regular expression that included an un-matched ‘}’ or ‘]’ character that was not escaped caused an internal error.
  • In a specific scenario nothing happened when the new Paste Text As action was selected, except that an entry was made in the Error Log. The scenario was: a fresh install before any test text was specified and before the Regex View had been closed and re-opened.
  • The new Copy Text As action was never enabled in the same scenario.
Posted in Graphrex | Comments Off  

Graphrex 0.5: Import/export regular expressions via the clipboard, better graphics, and more

Graphrex 0.5 introduces tools to help you import and export regular expressions to Java code. It also has improved graphics to make diagrams clearer and more responsive to users, and other enhancements.

Regular expressions can now be imported and exported via new Paste As and Copy As actions. The new Paste As wizard takes a regular expression in Java String format that is already on the clipboard (i.e. that you have copied from your code) and applies a series of transforms that convert it into the simple regular expression format, for example by removing escape characters, so that you can paste the result directly into Graphrex for testing or visualization.

Here is a simple example:

"^\\.|^\\@" → ^\.|^\@

Transforms have removed the quotes around the string, and have un-escaped the ‘\’ character. There are other transforms as well — see the Help text.

The Copy As wizard reverses the process: you can copy your regular expression from Graphrex into the clipboard while transforming it into the required Java String format, then you can paste it into your source code editor.

Editing of complex regular expressions is a little easier in Graphrex 0.5 because the regular expression text editor (in the Regex View) has been enhanced with bracket matching. This works pretty much as the similar function does in the Eclipse Java source code editor.

In this version the graphics have also been improved. The diagram adjusts more automatically when you open and close combo boxes. This allows you to open a character set and inspect its contents without having the expanded node be over-written by adjacent nodes. We have also reduced the need for scroll bars within parts of the diagram, so they will appear much less often. As before, you can always use the Arrange action to re-draw a diagram and make it neater. Finally several small bugs that caused drawing errors have been fixed.

Bug Fixes

  • A warning occurred when the user had closed the Regex View and then switched to a new Graphrex editor
  • An internal error exception was being thrown in some regular expressions that contained an escaped meta-character.
  • Capture groups that had no content in a match were not being cleared of content from any previously-selected match.
  • Graphrex’s Regex View appeared not only when the focus was gained by a Graphrex editor (which is by design) but also by other editors as well.
  • Infinite loops could occur in the graphics code because of a thread synchronization issue.
  • Bugs that caused various errors in the Graphrex diagram were fixed.
Posted in Uncategorized | Comments Off  

Auto test, Help and Preferences: now with Graphrex 0.4

Automatic testing of your regex is now the default in Graphrex beta 0.4, along with extensive Help and more control over the plugin’s function and appearance with new Preference pages.

With automatic testing turned on (the default), the regular expression is automatically matched against any test text that you have provided. The matching happens each time you edit the regular expression or the test text. As in earlier versions, any matches will be highlighted in the test text, and you can select a match to see more information about any capture groups that matched. You can control the auto test feature with the new Graphrex Preference pages (Window > Preferences > Graphrex).

We have also enhanced the user interface in version 0.4 so that it is easier to tell when the regular expression has been edited and no longer corresponds to the visualization diagram displayed in the editor. Now you will know when this happens because the diagram will be grayed out. As before, just click outside the Regex View to re-create the diagram from the regular expression text.

Let us know how you like the new extensive Help text. It includes some of the content from the Graphrex web site, as well as a lot of new material. You can now control the font used in the diagram and elsewhere by setting a preference. See Help for advice on selecting a good font if you don’t like the default. This should be particularly useful for people who are working on platforms other than Windows and Mac.

Bug fixes

  • Match flags set within a group were being applied globally from then on, not locally within the group. Now they only apply within the group.
Posted in Uncategorized | Comments Off  

Understanding complex regular expressions in Graphrex 0.3

Version 0.3 of Graphrex makes it easier to see which parts of your regular expression correspond to elements in the visualization of that expression. Now selecting a diagram element  highlights the corresponding part of your regular expression.

As an example of this new function, consider the following regular expression to recognize IPV4 addresses. It is a slightly simplified version of a post to StackOverflow, and the original was all on one line:

(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}
(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)

The screenshot below shows this same regex in Graphrex with its visualization. Notice how selecting one of the character sets in the diagram not only selects it in the outline view but now also highlights the corresponding span in the regex. This helps to find the specific occurrence of this element in all three views. (Click on the diagram to see the full-size version).

Selection screenshot

Graphrex 0.3 can select the parts of your regular expression that represent character sets, groups, quantifiers (like * or +), boundary markers — in fact the part of your regular expression that corresponds to any diagram element. This makes Graphrex an even more powerful tool for probing the structure of your regexes.

In version 3 we have also fixed a number of bugs and laid the foundations for more function in the future. We postponed the introduction of some other new features to get this one released as soon as possible.

Posted in Graphrex, News | Comments Off  

Test your regular expression with Graphrex 0.2

Now you can test your regular expression with Graphrex. As well as the unique visualization introduced in the first version, now with version 0.2 Graphrex enables you to run a regex against test text and get visual feedback about matches, capture groups and more.

Testing a regular expression in Graphrex (screenshot)This screenshot shows the new function. Notice the visualization in the Graphrex editor. The corresponding regular expression can be entered and edited (with error highlighting) in the Regex view below the editor. Now on the same view you can enter the text to test the regex against. Run the test with the Run icon run button.

Any text that is matched by the regular expression is annotated with green squiggly underlines when you run the test, and its location is marked in the margin and on the overview ruler on the right. If you have capture groups in your regex, as in the screen shot, you can hover over a match to see what was captured by each group.

If you put the text cursor in one of the match annotations (e.g. by clicking on it) the annotation becomes selected as shown by the green background. Capture groups that have captured text for the selected match will be highlighted, in the both the diagram and the outline view, and the captured text will be shown. In the diagram it appears in the title bar of the capture group box, and in the outline view it shows up in a new Matched text column.

The Regex view remembers the test text you type in. (It is stored with the Eclipse metadata).

Other enhancements in version 0.2

  • Regular expressions containing newlines and certain other characters are now correctly restored when a Graphrex diagram is saved and re-opened.
  • The fields in the Regex view now use a unicode font.
  • The Outline view is improved to be more readable.
  • A bug with Save As was fixed.
Posted in Uncategorized | Comments Off  

Announcing Graphrex 0.1.0 (beta)

We are happy to announce the availability of Graphrex 0.1.0 beta (build 201007221143), a free plugin for Eclipse. Graphrex contributes a new graphical way to understand the structure and flow of Java regular expressions.

Graphrex screenshot with 5 labelsTake the Graphrex walkthrough to see the function available in this first version of Graphrex. You can enter regular expressions and immediately see a diagram that shows all the match conditions and how they relate to one another. There’s also a structured outline view that provides the same information in a tree.

There’s going to be much more to come, and we want to hear what you think, so please download and try out this first version, then use our forums to give us feedback and to make suggestions.

Posted in Uncategorized | Comments Off