[Xpand / Xtend] Recognizing custom UML Profile [message #639025] |
Sun, 14 November 2010 15:53  |
Eclipse User |
|
|
|
Hi,
I have created a really simple uml profile and a uml model which uses this profile (uml2 3.0.0).
I think I am loading the profile correctly in my workflow, but I do not know what I have to do so that the Xpand and Xtend editor will recognize my profile and its stereotypes.
I am not using packages in my uml models (neither in the sample.uml nor in the Forms.profile.uml). I guess that does not have to do anything with it, does it?
Both uml files are not within my Xpand project, but in their own projects.
I am using eclipse helios and I create my uml models with papyrus.
Where in my Xpand project do I have to add my Profile so the editors will recognize my profile (e.g. so that I can import that profile)?
I dont think just loading it in the workflow (see below) will do it, right?
I searched the forums and the internet. Either I haven't found the answer yet, or it should have worked like that.
Since I do not know what to do, I hope someone here can help me out.
<?xml version="1.0"?>
<workflow>
<property name="model" value="GoogleFormsUML/Sample.uml" />
<property name="profile" value="UMLProfiles/Forms.profile.uml" />
<property name="src-gen" value="src-gen" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
<registerGeneratedEPackage value="org.eclipse.uml2.uml.UMLPackage"/>
</bean>
<!-- instantiate metamodel -->
<bean id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<!-- Profile Model -->
<bean id="formsProfile" class="org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel">
<profile value="platform:/resource/${profile}" />
</bean>
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="platform:/resource/${model}" />
<modelSlot value="model" />
</component>
<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="mm"/>
<metaModel idRef="formsProfile"/>
<expand
value="template::template::main FOR model" />
<outlet path="${src-gen}" >
<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
</outlet>
</component>
</workflow>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03583 seconds