The development onf CLENotes v5 continues. I’ve done help-command and formatter that prettyprints CLENotes help to console. Formatter was quite easy to do using Xtend, which was a pleasant surprise.
I’ve done also the installation of Notes classes. It works so that when you execute the program, it checks whether or not Notes classes are in classpath. If not, CLENotes checks the default directories of Notes for location of Notes.jar and if it’s not found from the default location, it asks the location from the user. Then the Notes classes are extracted from jar-file to CLENotes classes-directory and they’re found the next time CLENotes is executed. This kind of installation should help users to get started more quickly with CLENotes.
I’ve started porting CLENotes commands from v4 to v5. So far pretty straight-forward translation work from Jython to Xtend.
Xtend is fulfilling it’s promise that I hoped quite nicely. Some of the highlights along the learning curve:
- Xtend advertises that it’s 100% Java compatible and it’s true. The Notes-classes are pure Java and there hasn’t been any problems calling Java from Xtend.
- Xtend loops don’t have breaks (but one workaround is to put the loop in a method and then instead of break just return from the method).
- Two things that I still forget sometimes are that variables require var (and final variables require val) and calling static methods is done using Class::Method instead of Class.Method.
- I discovered that Xtend’s extension methods are an excellent feature. Highly recommended to use them whenever possible.