Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How do I get .emx recognised as .uml2?
How do I get .emx recognised as .uml2? [message #474200] Fri, 13 July 2007 08:21 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Dear All,

We get passed .emx files from a supplier which are created in Rational
version 6.

They are .uml2 files.

We are using the compare tool to compare the current design to a new one.

At the moment all the users have to copy the .emx files as .uml2 and
then open them at which point the .uml file is auto-created.

Is there anyway in which I can tell the UML/EMF subsystem that a .emx is
a .uml2 & that it should simply open a .emx as a .uml2 & thus
auto-create the .uml file as this would remove what most of my users see
as an unnecessary step?

TIA

Adam
Re: How do I get .emx recognised as .uml2? [message #474203 is a reply to message #474200] Fri, 13 July 2007 13:57 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Adam,

A .emx file is not a .uml2 file - the .emx file format is a superset of the
..uml2 file format. A .emx file may contain elements (e.g. diagrams) that
cannot be recognized by the open source UML2 implementation, and will also
reference profiles and perhaps model libraries that are specific to
Rational. Also, .emx files (from RSx 6.x) use an enhanced cross-document
reference format that can't be handled by any of the EMF-based open source
resource implementations. If you want to load a .emx file, you're better off
using the APIs provided by Rational to do so, or exporting the models to
..uml2 format using the exporter provided by RSx.

Having said that, you can register the open source UML2 resource
implementation against a different extension using code similar to this:

resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "emx",
UML2Resource.Factory.INSTANCE);

Kenn

"AdamF" <user@domain.invalid> wrote in message
news:f77cnd$4v1$1@build.eclipse.org...
> Dear All,
>
> We get passed .emx files from a supplier which are created in Rational
> version 6.
>
> They are .uml2 files.
>
> We are using the compare tool to compare the current design to a new one.
>
> At the moment all the users have to copy the .emx files as .uml2 and then
> open them at which point the .uml file is auto-created.
>
> Is there anyway in which I can tell the UML/EMF subsystem that a .emx is a
> .uml2 & that it should simply open a .emx as a .uml2 & thus auto-create
> the .uml file as this would remove what most of my users see as an
> unnecessary step?
>
> TIA
>
> Adam
Re: How do I get .emx recognised as .uml2? [message #474204 is a reply to message #474200] Fri, 13 July 2007 14:03 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Adam,

Whey you say "[emx files] are .uml2 files", this is not true. .emx's handle
hrefs differently and also are composed of a notation metamodel. I would
not recommend doing what you are proposing, but, if you want to ...

Have a look at org.eclipse.uml2.uml.editor in the manifest. the extension
org.eclipse.ui.editors have a list of understood extensions. If you simply
add .emx there then the uml editor will attempt to open up .emx's.

Let me know if you run into other issues.

Regards,

- James.


"AdamF" <user@domain.invalid> wrote in message
news:f77cnd$4v1$1@build.eclipse.org...
> Dear All,
>
> We get passed .emx files from a supplier which are created in Rational
> version 6.
>
> They are .uml2 files.
>
> We are using the compare tool to compare the current design to a new one.
>
> At the moment all the users have to copy the .emx files as .uml2 and
> then open them at which point the .uml file is auto-created.
>
> Is there anyway in which I can tell the UML/EMF subsystem that a .emx is
> a .uml2 & that it should simply open a .emx as a .uml2 & thus
> auto-create the .uml file as this would remove what most of my users see
> as an unnecessary step?
>
> TIA
>
> Adam
Re: How do I get .emx recognised as .uml2? [message #623660 is a reply to message #474200] Fri, 13 July 2007 13:57 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Adam,

A .emx file is not a .uml2 file - the .emx file format is a superset of the
..uml2 file format. A .emx file may contain elements (e.g. diagrams) that
cannot be recognized by the open source UML2 implementation, and will also
reference profiles and perhaps model libraries that are specific to
Rational. Also, .emx files (from RSx 6.x) use an enhanced cross-document
reference format that can't be handled by any of the EMF-based open source
resource implementations. If you want to load a .emx file, you're better off
using the APIs provided by Rational to do so, or exporting the models to
..uml2 format using the exporter provided by RSx.

Having said that, you can register the open source UML2 resource
implementation against a different extension using code similar to this:

resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "emx",
UML2Resource.Factory.INSTANCE);

Kenn

"AdamF" <user@domain.invalid> wrote in message
news:f77cnd$4v1$1@build.eclipse.org...
> Dear All,
>
> We get passed .emx files from a supplier which are created in Rational
> version 6.
>
> They are .uml2 files.
>
> We are using the compare tool to compare the current design to a new one.
>
> At the moment all the users have to copy the .emx files as .uml2 and then
> open them at which point the .uml file is auto-created.
>
> Is there anyway in which I can tell the UML/EMF subsystem that a .emx is a
> .uml2 & that it should simply open a .emx as a .uml2 & thus auto-create
> the .uml file as this would remove what most of my users see as an
> unnecessary step?
>
> TIA
>
> Adam
Re: How do I get .emx recognised as .uml2? [message #623661 is a reply to message #474200] Fri, 13 July 2007 14:03 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Adam,

Whey you say "[emx files] are .uml2 files", this is not true. .emx's handle
hrefs differently and also are composed of a notation metamodel. I would
not recommend doing what you are proposing, but, if you want to ...

Have a look at org.eclipse.uml2.uml.editor in the manifest. the extension
org.eclipse.ui.editors have a list of understood extensions. If you simply
add .emx there then the uml editor will attempt to open up .emx's.

Let me know if you run into other issues.

Regards,

- James.


"AdamF" <user@domain.invalid> wrote in message
news:f77cnd$4v1$1@build.eclipse.org...
> Dear All,
>
> We get passed .emx files from a supplier which are created in Rational
> version 6.
>
> They are .uml2 files.
>
> We are using the compare tool to compare the current design to a new one.
>
> At the moment all the users have to copy the .emx files as .uml2 and
> then open them at which point the .uml file is auto-created.
>
> Is there anyway in which I can tell the UML/EMF subsystem that a .emx is
> a .uml2 & that it should simply open a .emx as a .uml2 & thus
> auto-create the .uml file as this would remove what most of my users see
> as an unnecessary step?
>
> TIA
>
> Adam
Previous Topic:How do I get .emx recognised as .uml2?
Next Topic:Re: Generating code with stereotypes
Goto Forum:
  


Current Time: Wed Apr 24 16:15:30 GMT 2024

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

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

Back to the top