We now have an internal password-protected DrJava blog. I think in some cases I will double-post my work on DrJava here on my blog. So, below is my weekly log:
This week I worked on the external process facility. I’m now able to run shell programs and Java programs, and Java properties can be used, and the runtime values are substituted in before the program runs.
At one point I added the ability to set the working directory where the execution starts, but I realized that, in order to keep things as general as possible, users might want to use Java properties and environment variables there too. That meant I couldn’t use DirectorySelectorComponent
anymore.
I got to the point where the dialog to set up external shell and Java programs looked pretty nice, including a syntax-highlighted preview of the command line with the runtime values substituted in for variables. There is also a dialog for browsing the variables that can be inserted, and it’s multi-tabbed now, so we can group variables into categories.
After some discussion about what variables should look like (I used %variable%
before), I changed my code to use ${variable}
. That made it more complex, but it uses the Ant syntax now. I believe %variable%
was MS DOS.
I then started working on allowing the user to save the processes and make them accessible from the main menu. Unfortunately, I made a wrong decision here about how to save the data in the OptionsConstants
. There was no built-in way to add new keys to be saved at runtime, and I wanted to add keys that looked like external.saved.1.name
, external.saved.1.type
, etc.
I have now realized that using several VectorOption<String>
is better, and I’m now changing the code. I have to make sure that it properly encodes quotes and other symbols, though.