Resource from non UML2 uml model [message #626193] |
Wed, 12 March 2008 00:31 |
Eclipse User |
|
|
|
Originally posted by: pfuriani.uci.edu
Resource resource = RESOURCE_SET.getResource(uri, true);
This is the line I use to create a resouce for a .uml file. This works
properly when the .uml file was created with the UML2 editor. However, when
the .uml file is created with a different UML program, Altova to be
specific, I notice that the "contents" array of the Resource object is
empty. So next when i call,
Package thePackage =
(Package)EcoreUtil.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);
,then "thePackage" is "null" because the contents of the Resource are
empty. I don't understand why the Resource contents only get filled in with
..uml files created with the UML2 editor and not by .uml files created by a
different editor. Its important that I can create a Resource from uml models
made by other programs besides UML2.
|
|
|
Powered by
FUDForum. Page generated in 0.03162 seconds