- A Concurrent Affair - http://www.concurrentaffair.org -

Semi-Weekly Log from 2/18/08 to 2/21/08

Again, another (semi-)weekly log from the DrJava blog. I’m really trying to crank out the basic design and most of the features quickly, and this is my major focus right now, because that way I can hopefully focus on a SIGCSE paper I plan to write (deadline: March 19) and the Java extension that allows subtyping for annotation. But here we go:

Changed keyboard shortcut for Debug mode to MASK + D, instead of just D.

Added DrJavaProperties and PropertyMaps instead of a Map of Properties. These DrJavaProperties can be lazy and delay computationally intensive tasks like that of finding all compiled class files until actually necessary. In the “Preview”, they may display stale values.

Two basic categories existed before, “Java” with the System.getProperties, and “Config” with the values of the DrJava configuration. The “Config” category was previously named “DrJava”, but I thought “Config” was a better name. All the entries in “Config” start with “config.”. The entries in “Java” have the names as specified by Sun.

A new category has been added, “DrJava”, with just a few sample variables. One of them is “drjava.current.time.millis”, which contains the current time in milliseconds since the beginning of the epoche — useless, but a good first test.

“drjava.current.file” contains the currently open document as an absolute path.

“drjava.all.files” contains all open files, separated by File.pathSeparator. “drjava.project.files”, “drjava.included.files” and “drjava.external.files” do the same for project files, external files that are saved with the project, and files that are open but not part of the project.

The same “drjava.\*.files” properties exist as “drjava.\*.files.spaces”, but here, a space is used to separate the files.

Properties can listen to each other to find out when their values have been invalidated. There is a debug mechanism in place that prevents infinite loops.

These are only some very basic sample properties, and we need lots more, and we need to make sure that we invalidate the values of the properties in all the right places, but it’s a good start.

On a Linux system, for example, try opening a project and then run an external process with the command line:

tar cfvz test.tar.gz ${drjava.all.files.spaces}

It will create a tar file with all the source files currently open.

Not bad, eh? Please help me figure out what other properties are needed, and how we can easily make them relative to other directories, etc.

This is a massive commit, with far-reaching changes. Please update your working copy of DrJava to the newest revision and test the changes, the new features, and also the old ones to make sure I haven’t broken anything.


M    src/edu/rice/cs/drjava/config/OptionConstants.java
A    src/edu/rice/cs/drjava/config/DrJavaProperty.java
A    src/edu/rice/cs/drjava/config/JavaSystemProperty.java
A    src/edu/rice/cs/drjava/config/PropertyMaps.java
A    src/edu/rice/cs/drjava/config/ConfigProperty.java
A    src/edu/rice/cs/drjava/config/EagerProperty.java
M    src/edu/rice/cs/drjava/ui/MainFrame.java
M    src/edu/rice/cs/drjava/ui/InsertVariableDialog.java
M    src/edu/rice/cs/drjava/ui/ExecuteExternalDialog.java
M    src/edu/rice/cs/util/JVMProcessCreator.java
M    src/edu/rice/cs/util/StringOps.java
M    src/edu/rice/cs/util/StringOpsTest.java
M    src/edu/rice/cs/util/ProcessCreator.java
[1] [2]Share [3]