I have a profile that defines a Stereotype "Struct" in package "Core". This profile is applied to a uml::Class in another uml file. However, the type "profile::Core::Struct" is never found when the workflow is run, even though the Xpand editors auto-complete function sees it.
I've created a very simple example of this problem that runs without causing an error but fails to generate anything because it can not resolve the type.
DEFINE Root FOR uml::Model
EXPAND ClassRoot FOREACH ownedType.typeSelect(e::Core::Struct)
ENDDEFINE
And the workflow is defined as:
<workflow>
<property name="model" value="platform:/resource/e.simple.project/src/model/simple-e-profiled-model.uml" />
<property name="src-gen" value="src-gen" />
<property name="modelSlot" value="e" />
<!-- prepare for performing uml stuff -->
<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri=".." />
<!--UML2 Profile - Metamodell-->
<bean id="mm_profile" class="org.eclipse.xtend.typesystem.uml2.UML2MetaModel" />
<!--UML2 e Profile - Metamodell-->
<bean id="e_profile" class="org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel">
<profile value="platform:/resource/e.simple.project/src/model/e.profile.uml"/>
</bean>
<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${model}" />
<modelSlot value="${modelSlot}" />
</component>
<!-- directory clean -->
<component id="dirCleaner" class="org.eclipse.emf.mwe.utils.DirectoryCleaner" directory="src-gen"/>
<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="e_profile"/>
<metaModel idRef="mm_profile"/>
<expand value="template::Main::Root FOR ${modelSlot}" />
<outlet path="${src-gen}" />
</component>
</workflow>
The UML models are created using MagicDraw 16.6
Any help would be greatly appreciated. I've searched the forums and bugzilla but can't find anyone else having this problem. If it si important im running Eclipse 3.5.1 with Xpand 0.7.2
Eamonn Linehan wrote on Thu, 25 February 2010 07:44
I have a profile that defines a Stereotype "Struct" in package "Core".
You have to place stereotypes flat into the profiel. No further packaging is supported.
In your case I would like to remane the profile from 'e' to 'Core'.
If you want more 'packages', you have to define further profiles.