Load samples using UML2 2.1.0 API [message #471736] |
Tue, 20 March 2007 07:02 |
Marcio Messages: 2 Registered: July 2009 |
Junior 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
|
|
|
Re: Load samples using UML2 2.1.0 API [message #471737 is a reply to message #471736] |
Tue, 20 March 2007 13:07 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Marcio,
What does the ExtendedPO model from Magic Draw look like? It sounds like it
contains an invalid value for a feature on line 11.
Kenn
"Marcio" <marciofsoliveira@gmail.com> wrote in message
news:89bdab8c55b287f193e717ef5dea0c8a$1@www.eclipse.org...
> 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
>
|
|
|
|
|
Re: Load samples using UML2 2.1.0 API [message #601870 is a reply to message #471736] |
Tue, 20 March 2007 13:07 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Marcio,
What does the ExtendedPO model from Magic Draw look like? It sounds like it
contains an invalid value for a feature on line 11.
Kenn
"Marcio" <marciofsoliveira@gmail.com> wrote in message
news:89bdab8c55b287f193e717ef5dea0c8a$1@www.eclipse.org...
> 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
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03527 seconds