Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Load samples using UML2 2.1.0 API
Load samples using UML2 2.1.0 API [message #601859] Tue, 20 March 2007 07:02
Marcio Oliveira is currently offline Marcio OliveiraFriend
Messages: 50
Registered: June 2010
Member
Hi all,

I would like to use the EMF/UML2 API to handle Magic Draw 12.1 EMF/UML2
Models. (Can I do that using the current version of Eclipse+EMF+UML2 ?)

Then, I'm starting using the sample files present in the "Introduction
to UML2 Profiles" and "Getting Started with UML2" articles. But, I had
problems using the ExtendedPO2 models.

My current configuation is Eclipse 3.3M5, EMF 2.3 and UML2 2.1. I'm
also using the UML2Article load and register methods to handle the model,
as following:

protected static org.eclipse.uml2.uml.Package load(URI uri) {
org.eclipse.uml2.uml.Package package_ = null;

try {
Resource resource = RESOURCE_SET.getResource(uri, true);
package_ = (org.eclipse.uml2.uml.Package) EcoreUtil
.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);
} catch (WrappedException we) {
err(we.getMessage());
System.exit(1);
}
return package_;
}


My implementation always run until "Resource resource =
RESOURCE_SET.getResource(uri, true)" line. Then, it stop printig the
message:

org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'null' is not
legal. (file:/C:/projetos/uml2Test/resources/resources2-0/ExtendedP O2.uml,
11, 21)

Some one could help me?

thanks in advance
Marcio
Previous Topic:How to model "Exception throwing" for operartion in uml 2 class diagram
Next Topic:Examples of the UML customization presentation
Goto Forum:
  


Current Time: Fri Mar 29 10:39:52 GMT 2024

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

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

Back to the top