I decided to merge the drjava-guiAvailListener branch into the trunk, even though I said I wouldn’t do this until after the next stable release. Dr. Nguyen and I have used this new version quite a bit already, and we still have a few days before the stable. I’m already confident the new implementation is bug-free.
The GUI availability listeners allow us to tie the state of certain GUI actions, for example the menu item to invoke Javadoc, to the availability of abstract components, for example the compiler. This had become necessary because many of the GUI actions are actually intertwined and mutually exclusive. Running JUnit could invoke the compiler first, and we knew that for a while; but just this spring, we realized that running Javadoc may have to do that too if we are dealing with Language Level source files.
The problem with directly enabling and disabling GUI actions was in some cases, these GUI actions were being re-enabled too early, before the entire action had actually been performed. With these new listeners, actions can specify a set of abstract components that must all be available, and when the status of one of these components changes, the GUI action is enabled or disabled appropriately.