Clone wiki

Fairlight / UpdateImport Tool


Fairlight is organized in packages. To make the handling of imports simpler for the developer Fairlight provides a wildcard-like import like in Java.

In Java you can do something like:

    import mycom.mypacke.*

This is not possible in Monkey, but Fairlight still provides a similar mechanism:

    import fairlight               'Imports the whole fairlight framework
    import fairlight.src.core 'Imports all submodules of core

Remember that Monkey only imports the classes that are really required (unless you use reflection). So you can just use Import fairlight and don't have to the package names.

This solution requires it to always update the package import files. This could be quite an intense task. So a small tool (written in Monkey) called upateimports is provided (in tools folder), that automatically scans all folders of Fairlight and creates (and overwrites) all required files.