Running doc search tool from workbench now working

I have added the Tads 3 Search tool to my Workbench as an External Tool and I can now run the utility from within the Workbench.

Here’s how I did it:

In the External Tools page of the Workbench Tools dialog, enter the following data into the dialog’s input fields…

Title — enter whatever text you want to appear on the Tools menu for launching the utility

Program — this is a full path to the executable to be run, in this case, java.exe in your Java\JRE\bin directory (on my system, it’s C:\Program Files\Java\jre8\bin\java.exe).

Arguments — the arguments required by java.exe. You will have to give full paths to both the jar file and the properties file. You’ll also have to enter these by hand, which makes it an error-prone task. Note that the arguments have to be specified in Java syntax, which means forward slashes even though it’s on a Windows system. No backslashes here (but do keep the backslashes in the Program field that identifies the location of java.exe). Here’s how I’ve defined the Arguments field in my Workbench: -jar D:/dev/tads/resources/tools/tadsDocSearch/tadsDocSearch.jar d:/dev/tads/resources/tools/tadsDocSearch/resources/

Initial Directory — in the drop-down menu at the right of the field, choose Project Directory. This does nothing for the search utility but is required by Workbench.

You must have a TADS 3 project open. If you try to run the search tool from the Tools menu without first opening a project, the Workbench will crash.

While figuring all of this out, I found it very useful (in fact, crucial) to have the Capture output to debug log window selected in the Options dialog, because it echoed any typing errors I made. But I found it a bit confusing to use—if you keep it on display the Workbench doesn’t always update the log. You need to hide it after each use (right click on the Debug Log tab).

Then, once I got the tool working, it would only open once until I did something else in the Workbench, then it would work again. If I ran the search tool, closed it, then tried to run it again, it would not work until I did something else (close the log, view a file, just something). After I unselected the checkbox in the Options dialog, the search tool opens every time.


Well done on figuring all that out!

Following your guidelines, I’ve now managed to get it working too. Fortunately I have a file manager that lets me copy path names to the clipboard, so I didn’t have to type them all by hand.

Just one addendum to your instructions for anyone who may need it; if a path name you’re using as an argument includes a space (e.g. because it’s in your TADS 3 directory) you need to put quote marks round the path name. For example the text in the Arguments field in my setup now reads:

-jar "C:/Users/Eric/Documents/TADS 3/tadsDocSearch/tadsDocSearch.jar"  "C:/Users/Eric/Documents/TADS 3/tadsDocSearch/resources/"