Differences
This shows you the differences between two versions of the page.
features:extensibility [2020/04/16 10:56] |
features:extensibility [2020/04/16 10:56] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Extend generation process ==== | ||
+ | Generation process is driven by a <wrap adicode>Scenario Tree</wrap> contained inside **Scenario.xml** file.\\ | ||
+ | Update <wrap adicode>Scenario Tree</wrap> will change the generation process.\\ | ||
+ | Several ways are proposed to impact the generation: | ||
+ | * Specify Pojo rewriters: Pojo will be rewrited. Changes will impact input for generation process. | ||
+ | * Specify items in the Plugin Entities list of the <wrap adicode>Scenario Tree</wrap> to force generation to add features. | ||
+ | * Use extension of the default scenario classes: Changes will impact the generated <wrap adicode>axml</wrap> files. | ||
+ | * Use extension of the default generators classes: Changes will impact the generated <wrap adicode>java</wrap> files. | ||
+ | |||
+ | You can also use or create a new file for a partial <wrap adicode>Scenario Tree</wrap> containing items described above. | ||
+ | There is an option for merging both <wrap adicode>Scenario Trees</wrap>.\\ | ||
+ | This feature is useful when you want to reuse similar changes for several projects. | ||
+ | <WRAP indic>see [[tutorial:customize_scenario|Customize scenarios]].</WRAP> | ||
+ | \\ | ||
+ | |||
+ | ==== Extend components ==== | ||
+ | |||
+ | You can easily extend components provided automatically by generated classes. This is a very important feature for Adichatz. | ||
+ | \\ \\ | ||
+ | Suppose that you want the foreground color of field description to change when length of the text is greater than 90.\\ | ||
+ | At least, two possibilities are provided by Adichatz: | ||
+ | === Create a listener in the XML FilmDIGENERATED.axml file. === | ||
+ | Listeners provides a very effective and simple way to add behaviors to your application. | ||
+ | Several categories of listeners allows you to add code during running application: | ||
+ | * Life cycle: fired at specific times of the life cycle of a controller. | ||
+ | * Control: fired when value changes due to user actions. | ||
+ | * Entity: Listen to events on entities (lock, change status...) | ||
+ | * ... | ||
+ | <WRAP indic>see [[create_listener|Create a listener]].</WRAP> | ||
+ | \\ | ||
+ | === Extends a Controller === | ||
+ | Element described by XML file are controllers which are composition of UI widgets. These controllers could be easily extended and their extension could replace the original controller. | ||
+ | Controller extension is very useful when you have to bring cumbersome behaviors. It is heavily used to build Adichatz studio, in particular <wrap adicode>editors</wrap> which manages all <wrap adicode>*.axml</wrap> and <wrap adicode>Scenario.xml</wrap> files.\\ | ||
+ | <WRAP indic>see [[extend_controller|Extend a controller]].</WRAP> | ||