Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » saving a model content into a string
saving a model content into a string [message #1728060] Wed, 30 March 2016 16:34 Go to next message
jessica packer is currently offline jessica packerFriend
Messages: 9
Registered: March 2016
Junior Member
Dear members,

I followed this tuto to save my model in an UML file: https://wiki.eclipse.org/MDT/UML2/Getting_Started_with_UML2 .I'm trying to save the model as a string before generating this UML file but in vain. Confused
Can you please give me a hint on how I should proceed?

Regards,
Jessica.

[Updated on: Wed, 30 March 2016 16:36]

Report message to a moderator

Re: retrieve the content of a [message #1728072 is a reply to message #1728060] Wed, 30 March 2016 18:16 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1162
Registered: July 2009
Location: Canada
Senior Member

Hi, Jessica,

If you want to save the contents of a UML resource to a String, then
presumably you want it in XMI or XML format. For that, you can use the
XMIResource method save(Writer, Map) to save a resource to a string
using a StringWriter. (the XMIResource and UMLResource types inherit
this method from XMLResource)

HTH,

Christian


On 2016-03-30 16:34:25 +0000, jessica packer said:

> Dear members,
>
> I followed this tuto to save my model in an UML file:
> https://wiki.eclipse.org/MDT/UML2/Getting_Started_with_UML2 .I'm trying
> to save the model as a string before generating this UML file but in
> vain. :? Can you please give me a hint on how I should proceed?
>
> Regards,
> Jessica.
Previous Topic:UML M2M
Next Topic:PluginUML2: Validating a uml diagram
Goto Forum:
  


Current Time: Fri Jan 19 23:39:45 GMT 2018

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

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