Re: [UML2] how to load UML_PRIMITIVE_TYPES_LIBRARY [message #626122] |
Mon, 03 March 2008 19:12 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Jinhui,
This is another question for the UML2 newgroup.
Have you read the introductory articles on the UML2 documentation page
(http://wiki.eclipse.org/MDT-UML2#Articles)? They described how to work with
models and profiles both programatically and using the sample editor. I
suspect the problem you are having relates to not registering the pathmaps
for the UML library resources - see the FAQ at
http://wiki.eclipse.org/MDT-UML2-FAQ#What.27s_required_to_lo ad_a_UML_.28.uml.29_resource_from_a_standalone_application.3 F
Kenn
"Jinhui " <zhuj@in.tum.de> wrote in message
news:140c994f2ffa8aae6c53eb09bb4b9dc5$1@www.eclipse.org...
> Hello,
> another problem, I want to access the UML_Primitive_Lib, so that I can use
> the primitive types as type specification.
>
> I tried like this:
>
> URI primitiveTpyeLibURI =
> URI.createURI(XMI2UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_UR I);
> Model uml2PrimitiveTypesLibrary =
> (Model)UML2Util.load(
> RESOURCE_SET,
> primitiveTpyeLibURI,
> UMLPackage.Literals.MODEL);
>
>
> actually I've tried with many URIs in different classes, but none of work
> seemed to be working(i.e. load() always return null).
>
> --XMI2UMLResource
> * UML_PRIMITIVE_TYPES_LIBRARY_2_1_URI
> * UML_PRIMITIVE_TYPES_LIBRARY_URI
> --UMLResource
> * UML_PRIMITIVE_TYPES_LIBRARY_URI
> --UML22UMLResource
> * UML2_PRIMITIVE_TYPES_LIBRARY_URI
>
> Any one has any idea?
> best Regards.
> Jinhui
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03180 seconds