Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Unable to read profile or model file programatically
Unable to read profile or model file programatically [message #594000] Thu, 01 March 2007 08:42
Paul Gribben is currently offline Paul Gribben
Messages: 28
Registered: July 2009
Junior Member
Hi,

I'm using eclipse 3.2.1 with UML 2.0.2 and EMF 2.2.0, and have worked my
way through the tutorial 'Introduction to UML2 Profiles'
( http://dev.eclipse.org/viewcvs/indextools.cgi/uml2-home/docs /articles/Introduction_to_UML2_Profiles/article.html).
I have successfully generated a profile output file that is readable by
the eclipse profile editor, and have a model file that uses this profile
(also readable by eclipse UML editor). But as yet I am unable to read
either of these files from my test code.

Here's how I'm attempting to load the file(s):

ResourceSet RESOURCE_SET = new ResourceSetImpl();
Resource resource = RESOURCE_SET.getResource(uri, true);

package_ = (org.eclipse.uml2.uml.Package)
EcoreUtil.getObjectByType(
resource.getContents(),
UMLPackage.Literals.PACKAGE);


The return value is null for either the profile or for the model file URI.
Any help would be greatly appreciated.
Thanks
Previous Topic:Adding to DerivedEObjectEList gives UnsupportedOperationException, apparently new since EMF 2.3
Next Topic:Can I control the placement of stereotypes within XMI?
Goto Forum:
  


Current Time: Tue Sep 16 00:57:24 GMT 2014

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

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