Page under construction
People willing to contribute or modify the generator or who want a deeper understanding of the code.
In the following I will detail how the generator code works with the different steps of the algorithm. I will also explain some tricks I use at some point. I will try not to go into too much detail about the real code because I beleive code should be self explanatory and I would like this page to still be valid if the generator code is refactored.
Step 0 : Design objectives
This generator was created with various design objectives, here they are :
Generated code must be a fluent api
Setter and getters do not start with 'get' and 'set'.
Get the chart type
Set the chart type
Code must enable Junit testing ( especialy with MVP )
Code must be type safe (as much as possible)
Injection with GIN should be working
Step 1 : Getting the option file
There are 2 modes available, an offline mode and an online mode.
The generator will fetch the highcharts json option file through the internet at the location specified inside the properties file.
The generator will use a local file. This was designed to be able to work on the generator without an internet connexion.
Once fetched, the filed is read and every option is parsed into a JSONObject. Now we can start build our tree.
Setp 2 : Creating the tree