I’m up to the stage in my PasswordSafe port where I need to add an options dialog. In the original app it’s a five-tabbed dialog with quite a few options, so I thought I might have a crack at using JFace Preferences. Wow!
Thanks to some great help from this example I was up and running in no time. SWT Designer supports a wizard for whipping up the GUI of a Preferences Page, so I could hack the example to add just the controls I need to support.
This is one very cool API. It makes it easy to do the common things that you want to do (ie. read settings, reset settings to defaults, and update your users’ persistent settings). Big tick to the Eclipse guys! The more I use JFace the more I love it. It’s just got this “real worldiness” about it that makes developing very productive.
This options dialog is the only area of the port so far where I’ve deviated from a complete emulation of the original, but JFace Preferences are just too convenient to pass up (and they look just great). The code ends up being very clean as each page is its own class and is just responsible for those few settings that relate to it. Good stuff.