Static Constructors

The Java to D convertion often needs to use static ctors, because of the different semantic of constant fields in Java and D. This leads to many ctors and the chance is high, to get circular dependencies between the ported modules.

The solution is a generated 'staticctors.d' file, which contains all call to these static ctors. Therefor, the ctors are renamed to normal static functions, called "public static static_this()". The user of TioPort does now edit this file, by deciding the sequence of static ctor calls manually.

TioPort generates code for every class, that is placed into a static_this. It is the class registration. Because of this, every ported class has a static_this method.

The initialization process is a tricky thing and needs special attention. The staticctor.d can be taken as a template for a manually written one. In Swt the staticctor file calls the one from dejavu.