![]() |
Telelogic TAU (steve huntington) | ![]() |
Topic Title: how to extend TTDApplicationBuilder::build ? Topic Summary: how to access the model from a custom code generator launched from Artifact->Generate? Created On: 27-Mar-2007 05:05 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi, |
|
![]() |
|
![]() |
|
Did you read the on-line help chapter called "Adding Code Generators?" (Customizing Tau - Customizing Telelogic Tau)
The method described (briefly) there is the recommended way of adding new custom code generators. In short the technique is to use a standard executable (ABWGen.exe) as code generator container, and then implement the code generator behavior as an agent which will execute inside that container. Using this technique saves you from several difficult steps which are needed if a completely custom code generator executable is used. For example, the parsing of input XML (CGI = code generator input), the loading of the project file and all libraries, the binding of the model and so on. |
|
![]() |
|
![]() |
|
Mattias,
Yes. I do have versions of my code generator as an agent and as a batch. Also, I was able to make it work by extending the TTDApplicationBuilder::build too. I use the "file" and the "BuildArtifact" CGI ![]() Unfortunatly, this does not solve my problem. The problem is really with the LoadProject command. It is too sensitive to checking errors. For example, it would refuse to load a project that contains checking errors that relate to Diagram elements or informal elements. Also, it does not run the Auto Update. I would like to be able to load models in the same way as taubatch (if taubatch does not complain, my code generator should not complain either). Right now, I use a workaround by pre-processing the models with a tcl script that is launched using the tau <myproject.ttw> -script cleanup.tcl The script deletes all diagrams, usecase and informal entities in the model and calls u2::Check to auto update bad references, end terminates by killing the tau process. The problem with this solution is that it brings up the TAU user interface - and there is also a danger that it would hang for some reason (when TAU prompts the user for example). Also, it forces me to make a copy of the model (recursively retrieving all .u2 files and copying...) before running the code generator. An ideal solution would be to hook into taubatch, let taubatch load the model and operate directly on the object model without having to perform a LoadProject or a LoadFile. Thomas |
|
![]() |
Telelogic TAU
» TAU/Developer
»
how to extend TTDApplicationBuilder::build ?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.