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 #471736] Tue, 20 March 2007 07:02 Go to next message
Marcio is currently offline MarcioFriend
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 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
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 #471738 is a reply to message #471737] Tue, 20 March 2007 15:28 Go to previous messageGo to next message
Marcio is currently offline MarcioFriend
Messages: 2
Registered: July 2009
Junior Member
Kenn,

The ExtendedPO model that I use is the same file provided by
"Introduction to UML2 Profile" and "Getting start with UML2" article
presented in eclipse.org site. I didn't model the ExtendedPO in the Magic
Draw and tried to load it with EMF/UML2 API. May, have the provided
ExtendedPO model in the articles problems with the UML2 2.1.0 version?

Marcio
Re: Load samples using UML2 2.1.0 API [message #471804 is a reply to message #471738] Fri, 23 March 2007 13:56 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Marcio,

I was able to load the model from the article (ExtendedPO.uml) without
errors using the latest build... Are you sure that you are registering the
required extensions, packages, and pathmaps? Could you provide the copy of
ExtendedPO.uml that you are trying to load (in case it is somehow different
from the one I tried)?

Kenn

"Marcio" <marciofsoliveira@gmail.com> wrote in message
news:e5f08fb9543fa8e14059542d304c39de$1@www.eclipse.org...
> Kenn,
>
> The ExtendedPO model that I use is the same file provided by
> "Introduction to UML2 Profile" and "Getting start with UML2" article
> presented in eclipse.org site. I didn't model the ExtendedPO in the Magic
> Draw and tried to load it with EMF/UML2 API. May, have the provided
> ExtendedPO model in the articles problems with the UML2 2.1.0 version?
>
> Marcio
>
Re: Load samples using UML2 2.1.0 API [message #601870 is a reply to message #471736] Tue, 20 March 2007 13:07 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
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 #601878 is a reply to message #471737] Tue, 20 March 2007 15:28 Go to previous message
Marcio Oliveira is currently offline Marcio OliveiraFriend
Messages: 50
Registered: June 2010
Member
Kenn,

The ExtendedPO model that I use is the same file provided by
"Introduction to UML2 Profile" and "Getting start with UML2" article
presented in eclipse.org site. I didn't model the ExtendedPO in the Magic
Draw and tried to load it with EMF/UML2 API. May, have the provided
ExtendedPO model in the articles problems with the UML2 2.1.0 version?

Marcio
Re: Load samples using UML2 2.1.0 API [message #603152 is a reply to message #471738] Fri, 23 March 2007 13:56 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Marcio,

I was able to load the model from the article (ExtendedPO.uml) without
errors using the latest build... Are you sure that you are registering the
required extensions, packages, and pathmaps? Could you provide the copy of
ExtendedPO.uml that you are trying to load (in case it is somehow different
from the one I tried)?

Kenn

"Marcio" <marciofsoliveira@gmail.com> wrote in message
news:e5f08fb9543fa8e14059542d304c39de$1@www.eclipse.org...
> Kenn,
>
> The ExtendedPO model that I use is the same file provided by
> "Introduction to UML2 Profile" and "Getting start with UML2" article
> presented in eclipse.org site. I didn't model the ExtendedPO in the Magic
> Draw and tried to load it with EMF/UML2 API. May, have the provided
> ExtendedPO model in the articles problems with the UML2 2.1.0 version?
>
> Marcio
>
Previous Topic:Profile reapplication
Next Topic:newbie to uml2
Goto Forum:
  


Current Time: Wed Apr 24 17:04:31 GMT 2024

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

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

Back to the top