Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Linking Transformation Configurations in RSA
Linking Transformation Configurations in RSA [message #627900] Thu, 27 August 2009 15:34
Roshan S. is currently offline Roshan S.Friend
Messages: 125
Registered: July 2009
Senior Member
Hi,

I've been using RSA 7.5.3 to create a custom model to model
transformation. I also wanted to link my transformation to a built in
transformation that is shipped with RSA.

As I understand it, in my Transformation provider I just need to add a new
Chain Rule to link it to an existing transformation. My problem is that
for a Chain rule I also need the Target Container as the second parameter.


Looking around I found it in the Transform Context and so I created a
class variable that is set in my validateContext(ITransformationDescriptor
descriptor, ITransformContext context) method and I just call my getter in
my Chain Rule instantiation. However, the validateContext method is
always run after my createRootTransform method (shown below).:

What is the correct way to retrieve the TargetContainer from either the
TransformContext or through some property that I don't know of?

/**
* Creates a root transformation. You may add more rules to the
transformation here
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param transform The root transformation
* @generated NOT
*/
protected RootTransformation
createRootTransformation(ITransformationDescriptor descriptor) {
return new RootTransformation(descriptor, new MainTransform()){
protected void addPostProcessingRules() {
add(new UMLProfilesConsistencyCheckRule());
//Run the UML to LDM transformation next
if(getTargetContainer() != null){
add(new ChainRule(UML2LDM, getTargetContainer()));
}
super.addPostProcessingRules();
}};
}
Previous Topic:Linking Transformation Configurations in RSA
Next Topic:[Announce] MDT UML2 3.1.0 I200908281332 is available
Goto Forum:
  


Current Time: Thu Nov 23 16:37:18 GMT 2017

Powered by FUDForum. Page generated in 0.02187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software