Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Resource from non UML2 uml model
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.
Previous Topic:EMF and UML2 M5 install issue
Next Topic:UML2 for activity&composite diagram?
Goto Forum:
  


Current Time: Tue Sep 02 21:21:36 GMT 2014

Powered by FUDForum. Page generated in 0.01501 seconds