Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Primitive types and Java types in XMI
Primitive types and Java types in XMI [message #626453] Wed, 30 April 2008 09:21
Eclipse UserFriend
Originally posted by: swt.magellium.fr

Hello all !

I managed to import XMI 2.1 files generated by other uml tools
(Enterprise Architect & Bouml) into eclipse, and it works well (at least
with Bouml) except for primitive types and java types.
For instance, in Bouml, if I define a class attribute with type "int",
the resulting XMI declaration becomes :

<ownedAttribute xmi:type="uml:Property" name="myIntAttribute"
xmi:id="BOUML_0x1f482_1" visibility="private">
<type xmi:type="uml:Class" xmi:idref="BOUML_datatype_0"/>
[...]
</ownedAttribute>

Where "BOUML_datatype_0" is defined as :

<packagedElement xmi:type="uml:DataType" xmi:id="BOUML_datatype_0"
name="int"/>

After importing that into eclipse, I get an "int" class definition.
If I use EMF to generate the corresponding model classes, it will result
in creating a "int" class (public class int extends EObject) !
Of course, I'd like to use the primitive java type int instead of this
class !
The same kind of problem appear with other java classes such as
java.util.Date...

So I'd like to know how to work around this problem... Can I do
something with my UML tool such as using "special" stereotypes which
would be recognized when importing into eclipse ?
Or should I use some transformation (xsl) on my XMI files in order to
change types declarations into ECore/XML types declarations ?
Maybe there's a way under Eclipse, to switch attribute types from "fake
classes" to ECore classes ?

Any advice would be really appreciated. I already tried a lot of
different things, but I can't find any working solution... I hope this
is a "well known newbie problem" so that someone will tell me the right
thing to do in no time :)

Thanks in advance !
Stephane
Previous Topic:[Announce] MDT UML2 2.2.0 I200804291920 is available
Next Topic:[Stereotype] isAppliedStereotype differs on JavaDoc and Implementation
Goto Forum:
  


Current Time: Thu Apr 25 16:20:06 GMT 2024

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

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

Back to the top