| [xtend] typeSelect() [message #759347] |
Mon, 28 November 2011 08:06  |
majestic Messages: 11 Registered: September 2011 |
Junior Member |
|
|
Hi,
i have a simple transformation in which i only want to do example given typeSelect(uml::Property).
First the workflow file :
<workflow>
<!-- Properties -->
<!-- Initialize CompoSE workflow components -->
<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true"/>
<!-- Parse Model -->
<component id="xmiParser" class="org.eclipse.xtend.typesystem.emf.XmiReader">
<modelFile value="scenarios/indicators/model/test.uml"/>
<outputSlot value="test"/>
</component>
<!-- Run indicator -->
<component class="org.eclipse.xtend.XtendComponent">
<metaModel id='umlMetaModel' class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<metaModel id='indicatorCollectionResult' class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<metaModelFile value="scenarios/indicators/indicatorOutput/CollectionResult.ecore" />
</metaModel>
<invoke value="scenarios::indicators::stepbystepIndicator::typeSelect::run(test)"/>
<outputSlot value="values"/>
</component>
<!-- Output result -->
<component class="org.eclipse.xtend.typesystem.emf.XmiWriter">
<modelFile value="scenarios/indicators/output/outputModel.xml"/>
<inputSlot value="values"/>
</component>
</workflow>
and here the extend file typeSelect
create result::CollectionResult run(result::CollectionResult in) :
result.addAll(in.result.typeSelect(uml::Property))->
;
Now my question. Is there any possibility to give the type from the workflow to the extend file. Something like
value="scenarios::indicators::stepbystepIndicator::typeSelect::run(test, uml::Property)"/>
create result::CollectionResult run(result::CollectionResult in, Type t)
To give a string its no problem, but i dont know how to do it with a type. Thanks in advance!
|
|
|