|
|
|
|
|
|
|
|
|
|
Re: PrimitiveType [message #908767 is a reply to message #908642] |
Thu, 06 September 2012 01:01 |
|
Hi, Florian,
If you have other classes in your model that have properties that
reference Integer as their type, then where did they get it from?
Probably it is the Integer in the UML Primitive Types library. The URI
for the library resource is
pathmap://UML_LIBRARIES/UMLPrimitiveTypes.profile.uml
You would see it already loaded in the editor if you open your model in
the UML Editor.
Anyways, given that you already have properties of Integer type, you
should be able to find the library resource (URI as above) loaded in
your resource set. The first element in the resource is a package on
which you can use the getOwnedType(…) method that you mentioned
earlier, to get the Integer type.
HTH,
Christian
On 2012-09-05 18:05:40 +0000, Florian Wartenberg said:
> Ok I have a .uml file which I load then I do some transformations on
> the model. At some point I have to create a new property inside my main
> class. Therefore I use the line written above. My property is created
> but has no type. I want to have a property which has the type
> "<PrimitveType> Integer" which several other properties of the model
> already have. The second argument of the method is "Type" I do not know
> what Java or EMF is expecting me to resolve it to so I get the Integer
> type. If I for example resolve the second argument to my class
> ("modelClass") then the property is created whith a type and the type
> is <Class> ECU which is the name of my class inside the model.
>
> regards Florian
|
|
|
Powered by
FUDForum. Page generated in 0.04386 seconds