Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to customize an existing generator
xomega
#1 Posted : Friday, November 2, 2012 6:48:39 PM(UTC)
xomega



Xomega provides you full control of the way your artifacts can be generated by allowing you to create new generators as well as to customize existing generators, which is much easier and may not even require significant knowledge of XSLT.

Here are the steps you can take that will help you customize an existing generator. Note, that they require the Full edition of Xomega.Net as well as availability of the source code for the generators. If you install an evaluation version of the Full edition, then you can use a generator that comes with the source code in the evaluation version, e.g. the DB Lookup Cache Loaders from the Static Data folder.
  1. Open the generator's source by selecting the generator in the model project and pressing F7.
  2. If you want to customize the static part of the generated code, such as a base class to inherit from, or some boilerplate code that gets generated, then find this code in the script and update it accordingly.
  3. If you need to update the generation logic, then find the place in the generator's script, where this logic is implemented, and update it appropriately. You can either use existing functions and templates defined in Xomega XSLT scripts, or develop your own functions and templates as needed.
  4. If you need your generators to use additional information that is not captured in the model, then you can either extend the model via custom additional configurations, or define a generator parameter. The latter is better used when this parameter is specific to this generator and is not tied to any particular element of the model. If the additional information should be tied to any specific model elements, then you want to extend the configuration of those elements. Otherwise, if the additional information must be shared between multiple generators, then you are better off defining it as part of the global model configuration.
  5. Debug your generator to make sure it is working as desired.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.