Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » UML2 Profile Types Not Found
UML2 Profile Types Not Found [message #516877] Thu, 25 February 2010 07:44 Go to next message
Eamonn is currently offline Eamonn
Messages: 1
Registered: February 2010
Junior Member

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.

https://www.cs.tcd.ie/Eamonn.Linehan/email-attachments/e.sim ple.project.zip

The template contains:
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
Re: UML2 Profile Types Not Found [message #516881 is a reply to message #516877] Thu, 25 February 2010 08:06 Go to previous message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Hello Eamonn Linehan,

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.

Regards
Darius
Previous Topic:[xtend] How to write this transformation?
Next Topic:[JET] <c:iterate> , arithmetic questions
Goto Forum:
  


Current Time: Sat Apr 19 23:17:57 EDT 2014

Powered by FUDForum. Page generated in 0.11532 seconds