DVT Eclipse IDE Run Configurations - How to Define Custom Actions for Filter Hyperlinks

Description

A simple yet useful application of custom hyperlink actions is built in this video: when clicking on a hex number in a log file, a window pops up showing the number in several bases.

Transcript

You can associate an action to the hyperlinks produced by a DVT Run Configurations filter. Namely, when clicking on a hyperlink, another Run Configuration can be launched.

Let's use this feature for a simple application. Let's create a hyperlink for every hex number in the simulation log. When clicked, run a calculator application to display the number in multiple bases.

Creating a Filter to Match Hex Numbers

First off, we have to create a filter which matches hex numbers. We use a special variable called cmd.

Steps:

  1. Fill in the name of the Run Configuration we wish to launch when hyperlinking.
  2. Fill in a regular expression to match hex numbers.

Note that we've captured the actual number into a capturing group for later use. All regular expression capturing groups are available at runtime for the calculator run configuration in the form of environment variables.

Defining the DVT Generic Run Configuration to Start the Calculator

Now let's define the DVT generic run configuration which starts up the calculator.

Steps:

  1. Fill in the command and the environment variable to be passed as argument.
  2. Since the output of this run configuration is not useful, we will simply not allocate a console.

Running the Simulation and Testing the Hyperlinks

And that's about it. Run the simulation again and click on any hex number to pop up the calculator.