Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Lost xml comments save editor
Lost xml comments save editor [message #425812] Tue, 09 December 2008 09:05 Go to next message
David CHAUTARD is currently offline David CHAUTARDFriend
Messages: 102
Registered: July 2009
Senior Member
Hello,
I have a problem when I save my editor after a modification done with IHM.
I loose the comments which were previously in the file. When I execute my
doSave() method, I get my resources to save it, but I don't get the
comments.
How can I get them, have we an option to do this?

Thx for your help,
David
Re: Lost xml comments save editor [message #425816 is a reply to message #425812] Tue, 09 December 2008 10:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30898
Registered: July 2009
Senior Member
David,

EMF will preserve comments only if they occur for complex types with
mixed content. Generally, if comments are imported, they should be part
of the model, rather than floating around in the white space...


David CHAUTARD wrote:
> Hello,
> I have a problem when I save my editor after a modification done with
> IHM. I loose the comments which were previously in the file. When I
> execute my doSave() method, I get my resources to save it, but I don't
> get the comments.
> How can I get them, have we an option to do this?
>
> Thx for your help,
> David
>
Re: Lost xml comments save editor [message #425823 is a reply to message #425816] Tue, 09 December 2008 13:13 Go to previous messageGo to next message
David CHAUTARD is currently offline David CHAUTARDFriend
Messages: 102
Registered: July 2009
Senior Member
Ed,
If I understand what you say, I have to add the comment like an attibute
in my complex type.
But my problem is that users comment some part of xml to realise a test,
and they modify some attributes with the IHM. And when he save, it remove
the commented part.

David.
Re: Lost xml comments save editor [message #425854 is a reply to message #425823] Wed, 10 December 2008 09:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30898
Registered: July 2009
Senior Member
David,

Nevertheless, we only maintain comments for complex types with mixed
content. In all other cases we treat it as whitespace and ignore it.


David CHAUTARD wrote:
> Ed,
> If I understand what you say, I have to add the comment like an
> attibute in my complex type.
> But my problem is that users comment some part of xml to realise a
> test, and they modify some attributes with the IHM. And when he save,
> it remove the commented part.
> David.
>
Previous Topic:emf export
Next Topic:List<String> as operation return type in EMF
Goto Forum:
  


Current Time: Mon Feb 24 09:30:08 GMT 2020

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

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

Back to the top