This code may be freely copied and used. It may be used in commercial applications, but cannot be sold for a profit. If used within a commercial application, this code must be distributed for free along with the application. The same applies for any work derived by modifying this code.
This has been tested with ECLiPSe 5.5, 5.6.