Topic
2 replies Latest Post - ‏2011-12-13T02:35:09Z by SystemAdmin
SandroRossi
SandroRossi
2 Posts
ACCEPTED ANSWER

Pinned topic RSA Plugin Develeopment:Transformation Service:Xtools Transformation Extens

‏2011-12-12T21:14:37Z |
Hello,

I'm currently developing a plugin for RSA.

Conceptually, It'll extend the "UML to Java Transformation".
I'm using the "Xtools Transformation Extensions".
Unfortunatelly, I couldn't get my work done just by adding new Rules, Properties and ContentExtractors.

question:

How can I get access to a stack that contains the number of 'uml class diagram entities'(classes, enumerations, etc...) that the Transformation Service will still have to process ?

Ex: Suppose I'm transforming a whole package consisting of 9 classes and 2 enumerations, by a configuration .tc file that I've already created.
On the "protected Object createTarget(ITransformContext context)" method, how can I have access to the number of uml entities that weren't transformed yet?

I must set a flag in my environment to indicate the ending of the transformation, something like "( if (stack.size() == null) do "set my flag")"

thank you,
Updated on 2011-12-13T02:35:09Z at 2011-12-13T02:35:09Z by SystemAdmin
  • SandroRossi
    SandroRossi
    2 Posts
    ACCEPTED ANSWER

    Re: RSA Plugin Develeopment:Transformation Service:Xtools Transformation Extens

    ‏2011-12-12T21:19:07Z  in response to SandroRossi
    *on the last line:

    "( if (stack.size() == ZERO) do "set my flag")"

    :)
  • SystemAdmin
    SystemAdmin
    14225 Posts
    ACCEPTED ANSWER

    Re: RSA Plugin Develeopment:Transformation Service:Xtools Transformation Extens

    ‏2011-12-13T02:35:09Z  in response to SandroRossi
    You probably won't find any such property to read out how many elements are left.

    If your objective is to be notified of the end (or start) of the transformation you can implement the IRunTransformationListener interface and register it with RunTransformationEventManager.getInstance().addListener(...). The onTransformationStart/onTransformationEnd events will be called as the transformation runs.
    Please search the Help for javadoc on this classes.

    regards
    Sandeep