Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » UML to XMI export programmatically?
UML to XMI export programmatically? [message #417473] Wed, 12 March 2008 12:43 Go to next message
Eclipse UserFriend
Originally posted by: GaryRMartin.insightbb.com

There is a UML to XMI Interchange Format converter as part of the Export in
'Eclipse'. I am looking for how to programmatically do the same thing. I
know I can build a XSLT or JET2 or something else; however, what I need to
be able to do is to programmatically invoke the same underlying
functionality (do not want the wizard dialog box...just the conversion
functionality).

I'm new to eclipse - might this be part of the puzzle?

http://download.eclipse.org/modeling/mdt/xsd/javadoc/2.3.0/o rg/eclipse/xsd/ecore/exporter/XMIExporter.html
Re: UML to XMI export programmatically? [message #417474 is a reply to message #417473] Wed, 12 March 2008 13:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Gary,

Are you simply trying to save a UML instance using an interchangeable
format? Maybe XMI2UMLResource does that? I'm not really sure where
this export action is; I don't work with UML much, though I have it in
my workspace. You'd create such a resource using
XMI2UMLResource.Factory.INSTANCE.create... It's best to ask about UML
on the UML newsgroup, which I've added to the "to" list of the reply.


Gary Martin wrote:
> There is a UML to XMI Interchange Format converter as part of the Export in
> 'Eclipse'. I am looking for how to programmatically do the same thing. I
> know I can build a XSLT or JET2 or something else; however, what I need to
> be able to do is to programmatically invoke the same underlying
> functionality (do not want the wizard dialog box...just the conversion
> functionality).
>
> I'm new to eclipse - might this be part of the puzzle?
>
> http://download.eclipse.org/modeling/mdt/xsd/javadoc/2.3.0/o rg/eclipse/xsd/ecore/exporter/XMIExporter.html
>
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UML to XMI export programmatically? [message #417742 is a reply to message #417474] Tue, 25 March 2008 21:03 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Gary,

Have a look at UMLEditor.doSaveAs().

It basically creates a new resource from a resource set...
resourceSet.createResource(uri,
XMI2UMLResource.UML_CONTENT_TYPE_IDENTIFIER);

Then the resource is then saved out. The conversion should happen
automatically.

I hope that helps.

Cheers,
- James.

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fr8l4r$frn$1@build.eclipse.org...
> Gary,
>
> Are you simply trying to save a UML instance using an interchangeable
> format? Maybe XMI2UMLResource does that? I'm not really sure where this
> export action is; I don't work with UML much, though I have it in my
> workspace. You'd create such a resource using
> XMI2UMLResource.Factory.INSTANCE.create... It's best to ask about UML on
> the UML newsgroup, which I've added to the "to" list of the reply.
>
>
> Gary Martin wrote:
>> There is a UML to XMI Interchange Format converter as part of the Export
>> in 'Eclipse'. I am looking for how to programmatically do the same thing.
>> I know I can build a XSLT or JET2 or something else; however, what I need
>> to be able to do is to programmatically invoke the same underlying
>> functionality (do not want the wizard dialog box...just the conversion
>> functionality).
>>
>> I'm new to eclipse - might this be part of the puzzle?
>>
>> http://download.eclipse.org/modeling/mdt/xsd/javadoc/2.3.0/o rg/eclipse/xsd/ecore/exporter/XMIExporter.html
>>
>>
>>
>>
>>
Previous Topic:Cannot start ecore bundle
Next Topic:Weird XML Parser error
Goto Forum:
  


Current Time: Fri Sep 20 23:19:08 GMT 2024

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

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

Back to the top