Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Convert to Ecore Model(Convert a UML Model to Ecore Model (using the main menu bar))
Convert to Ecore Model [message #828362] Sat, 24 March 2012 13:33 Go to next message
Arnedo Ramon is currently offline Arnedo Ramon
Messages: 14
Registered: March 2012
Junior Member
Hi,

I want to convert a UML Model to an Ecore Model. I can see the option in the menu UML Editor -> Convert to -> Ecore Model, but is not enabled.
And I also want to convert an Ecore Model to UML Model; but in this case I can't see the option Sample Reflective option -> Convert to UML Model.

I found this "You will need the org.eclipse.uml2.examples plug-ins to see those menu options."

I have installed Eclipse Indigo, UML2 Extender SDK and UML2 Tools. I check my installation and I can find these plug-ins:
org.eclipse.uml2.examples_3.0.0.v201005031530.jar
org.eclipse.uml2.examples.uml.ui_3.0.100.v201008191510.jar
org.eclipse.uml2.examples.uml.ui.source_3.0.100.v201008191510.jar
org.eclipse.uml2.examples.source_3.0.0.v201005031530.jar

What can I do?

Thanks for your help,

Ramón.
Re: Convert to Ecore Model [message #828378 is a reply to message #828362] Sat, 24 March 2012 14:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi

The options are only enabled when the selected object supports the
operation. For Convert to Ecore this requires that the selection is a
Package rather than a Resource or Class.

Regards

Ed Willink

On 24/03/2012 13:33, Arnedo Ramon wrote:
> Hi,
>
> I want to convert a UML Model to an Ecore Model. I can see the option
> in the menu UML Editor -> Convert to -> Ecore Model, but is not
> enabled. And I also want to convert an Ecore Model to UML Model; but
> in this case I can't see the option Sample Reflective option ->
> Convert to UML Model.
>
> I found this "You will need the org.eclipse.uml2.examples plug-ins to
> see those menu options."
> I have installed Eclipse Indigo, UML2 Extender SDK and UML2 Tools. I
> check my installation and I can find these plug-ins:
> org.eclipse.uml2.examples_3.0.0.v201005031530.jar
> org.eclipse.uml2.examples.uml.ui_3.0.100.v201008191510.jar
> org.eclipse.uml2.examples.uml.ui.source_3.0.100.v201008191510.jar
> org.eclipse.uml2.examples.source_3.0.0.v201005031530.jar
>
> What can I do?
>
> Thanks for your help,
>
> Ramón.
>
Re: Convert to Ecore Model [message #828805 is a reply to message #828378] Sun, 25 March 2012 06:15 Go to previous messageGo to next message
Arnedo Ramon is currently offline Arnedo Ramon
Messages: 14
Registered: March 2012
Junior Member
Hi,
Thanks for your quick answer.

Now I can convert a UML model to an Ecore and I also convert this Ecore to a UML.

Is possible to have the option Convert to UML Model in the menu Sample Reflective option?

And another question: Can both models (Ecore and UML) be synchronized?

Regards

Ramón.
Re: Convert to Ecore Model [message #829185 is a reply to message #828805] Sun, 25 March 2012 20:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi

On 25/03/2012 06:15, Arnedo Ramon wrote:
> Hi,
> Thanks for your quick answer.
>
> Now I can convert a UML model to an Ecore and I also convert this
> Ecore to a UML.
> Is possible to have the option Convert to UML Model in the menu Sample
> Reflective option?
Yes it's possible, but it probably won't happen because that would
either make Ecore depend on UML or require UML to poke things into an
Ecore editor which is slightly inelegant; you could try raising a Bugzilla.
>
> And another question: Can both models (Ecore and UML) be synchronized?
Of course; it's only software. Kind of difficult so I would allow well
over a week to do so unless you are very familiar with Adapters and
Notifiers.

Regards

Ed Willink
Re: Convert to Ecore Model [message #885734 is a reply to message #828362] Wed, 13 June 2012 10:00 Go to previous messageGo to next message
max power is currently offline max power
Messages: 9
Registered: May 2012
Junior Member
Is there a way to convert UML to ecore programmatically?

Thanks in advance!
Re: Convert to Ecore Model [message #885747 is a reply to message #885734] Wed, 13 June 2012 10:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi

If you have UML Examples installed there is a toolbar menu entry in the
UML Model Editor. It uses UMLUtils facilities that are callable.

Regards

Ed Willink



On 13/06/2012 15:00, max power wrote:
> Is there a way to convert UML to ecore programmatically?
>
> Thanks in advance!
Re: Convert to Ecore Model [message #885817 is a reply to message #885734] Wed, 13 June 2012 12:42 Go to previous message
Carsten Reckord is currently offline Carsten Reckord
Messages: 17
Registered: June 2012
Junior Member
Hi Max,

Take a look at

org.eclipse.uml2.uml.util.UMLUtil.convertToEcore(Package, Map<String, String>)

It takes a package and a Map of options (see
UMLUtil.UML2EcoreConverter.OPTION__* javadoc for descriptions) and returns
the converted EPackage(s).

There's also a convertFromEcore(...) for the reverse.

Regards,
Carsten

On 13.06.2012 16:00, max power wrote:
> Is there a way to convert UML to ecore programmatically?
>
> Thanks in advance!
Previous Topic:Collaborative work on UML models
Next Topic:Load uml resource from an uploaded file
Goto Forum:
  


Current Time: Wed Aug 20 10:48:48 EDT 2014

Powered by FUDForum. Page generated in 0.11769 seconds