Skip to main content

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 12:44 Go to next message
Eamonn is currently offline EamonnFriend
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.

The template contains:
DEFINE Root FOR uml::Model
  EXPAND ClassRoot FOREACH ownedType.typeSelect(e::Core::Struct)

And the workflow is defined as:
	<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"/>
	<!-- load model and store it in slot 'model' --> 
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="${model}" />
		<modelSlot value="${modelSlot}" />
	<!-- 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}" /> 


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 13:06 Go to previous message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
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.

Previous Topic:problem running jet.transform task
Next Topic:Re: Using Jet with recursive data structures
Goto Forum:

Current Time: Mon Jun 25 04:27:45 GMT 2018

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

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

Back to the top