Integrate a contribution into your application
This wiki page assumes that you already added the contribution to your configuration as it is described at the Contrib libraries section.
Integrate a contribution
Once the contribution is available as a library it is easy to use it. Since the generator is able to resolve dependencies of all classes you can simply make use of the contribution classes in your application classes.
Integrate contributions which provide own themes
Whenever a contribution defines its own theme you need to apply this theme to your own theme classes. The contribution itself has the requirement to only define its own appearances, decorations, etc. without extending any existing theme.
This way you as the application developer can easily include the theming classes of the contribution. Just add the following line to your Application.js class:
// yourApplication is a placeholder for your top-level namespace // contribution is a placeholder for the top-level namespace of the contribution qx.Theme.include(yourApplication.theme.Appearance, contribution.theme.Appearance);
This assumes that no appearance Ids are unique. If the contribution defines appearance Ids which collide with your own appearance Ids you can overwrite your own theme by using the qx.Theme.patch method.
patch method. This can end up in unforseen results.
Generator topics
The generator is capable of dealing with contributions since all contributions are regarded as regular libraries. The following sections describe what the generator is offering you when using contributions.
Update generated application
After the integration of the contribution you need to update the application by running the source job of the generator.
./generate.py source
This will update the application accordingly and you can test your application in your favorite browser.
API Viewer
All contribution classes as well as their dependencies which are used in your application code are also shown in the generated API Viewer. This way you can easily check the API of the contribution for further development.
./generate.py api
