DrJava Preferences Stored in Project Files

I told myself I wouldn’t work on DrJava anymore, but here I go again. I Implemented feature request 3081586, Store Preferences within Projects, mainly because this was something I had wanted for a long time (I kept going back and forth between indent levels of 2 and 4), and because Corky had requested the language level setting to be stored in project files. This feature request was more general than what he wanted, but I think it was what DrJava needed.

There now is an “Advanced” button on the “Project Properties” dialog that takes the user to a secondary window. In that window, the user can list (by name, using predictive input)
those preferences that should be saved in the project file.

Note that for simplicity, the actual values are still configured in the “Preferences” window (Edit menu). This list only names the preferences whose values should be stored in the project file when the project is saved, and restored when the project is loaded again.

By default and for new projects, the language level and the indent level are saved in the project file and restored upon loading of the project.

For existing projects, you can cause DrJava to store the language level in the project file by going to Project Properties, clicking the new “Advanced” button in the bottom left corner, pressing the “Add” button underneath the list, and entering “Language Level”. Once you press OK to add that preference to the list, and OK to close the “Advanced” window, and then “OK” to close the Project Properties window, DrJava will store the language level in the project file.

Now I can set the indent level to 2 for DrJava and to 4 for most other projects. So can you if you grab the latest weekly build of DrJava.


About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in DrJava. Bookmark the permalink.

Leave a Reply