Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » [oaw] type.name empty for uml::PrimitiveType
[oaw] type.name empty for uml::PrimitiveType [message #560506] Wed, 08 November 2006 16:58
Eclipse UserFriend
Originally posted by: tobiasbuhr.gmx.de

Hi,

I have got a Problem with a M2M transformation in oaw.

My Meta-model is: <org.eclipse.uml2.uml/model/UML.ecore>

Via load resource, in the generated editor, I loaded

< org.eclipse.uml2.uml.resources/libraries/JavaPrimitiveTypes. library.uml >

and changed the type of a property to boolean, for example.

Then I want to transform it in oaw (xtend-component) using its name
(PrimitiveType extends uml::type and thus should have a name), but when
I use it, it is always empty.

Here is the snippet:

---

MyObject newMyObject(uml::PrimitiveType pt):
let o = new MyObject:
// o.setName("Test") ->
// o.setName(pt.toString()) ->
t.setName(pt.name)) ->
t;

---

If I use "Test" or pt.toString, the value will be set correctly, but
just pt.name is always empty.

pt.toString yields:

org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1049d3 (eProxyURI:
platform:/resource/org.eclipse.uml2.uml.resources/libraries/ JavaPrimitiveTypes.library.uml#boolean

so it really seems to be a PrimitiveType.

For any ideas, why PrimitiveType.name always is emtpty, I would be very
thankful.

---

For solution I tried to follow
< http://www.eclipse.org/gmt/oaw/doc/4.1/r50_uml2AdapterRefere nce.pdf>

(don't know if it helps.. :-))

but when I try to invoke the profile
<org.eclipes.uml2.uml/resources:profiles/Ecore.profile.uml>

(UML setup works fine <bean
class="org.openarchitectureware.uml2.Setup"/> :-))

like this:

<metaModel id="profile_java"
class="org.openarchitectureware.uml2.profile.ProfileMetaModel ">
<profile value="profiles/Ecore.profile.uml2"/>
</metaModel>

it yields the error:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
with uri 'http://www.eclipse.org/uml2/schemas/Ecore/3' not found.

Best regards, Tobias
Previous Topic:[oaw] type.name empty for uml::PrimitiveType
Next Topic:Invoking Java from Moscript problems ...
Goto Forum:
  


Current Time: Thu Apr 25 13:35:17 GMT 2024

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

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

Back to the top