| Copying Notes data from Palette to ecore model [message #821005] |
Wed, 14 March 2012 16:52  |
Eclipse User |
|
|
|
Hello GMF Experts!
I need your help once again. In my diagram editor, I'm using the palette to create the Notes (basically these are comments that users put in the diagram editor).
I saw that these Notes object are getting saved in the diagram file. Is there are a way to copy these Notes object in my model?
The reason is, I am not maintaining the diagram files generated when I open editor. I have code that deletes that diagram when I close the editor. So the NOTES created by the users gets wiped out once I reopen.
I was thinking to save these NOTES in my model instead then put them back if the user reopens the diagram editor.
Is this posssible?
Appreciate the help! thanks!
|
|
|
| Re: Copying Notes data from Palette to ecore model [message #821609 is a reply to message #821005] |
Thu, 15 March 2012 11:41  |
Eclipse User |
|
|
|
On 2012-03-14 21:52:04 +0100, Che Bumagat said:
> Hello GMF Experts!
>
> I need your help once again. In my diagram editor, I'm using the
> palette to create the Notes (basically these are comments that users
> put in the diagram editor).
>
> I saw that these Notes object are getting saved in the diagram file. Is
> there are a way to copy these Notes object in my model?
> The reason is, I am not maintaining the diagram files generated when I
> open editor. I have code that deletes that diagram when I close the
> editor. So the NOTES created by the users gets wiped out once I reopen.
>
> I was thinking to save these NOTES in my model instead then put them
> back if the user reopens the diagram editor.
>
> Is this posssible?
>
> Appreciate the help! thanks!
Hi,
As you mentioned, notes are part of the notation model and so are
stored in the diagram model.
> The reason is, I am not maintaining the diagram files generated when I
> open editor. I have code that deletes that diagram when I close the
> editor. So the NOTES created by the users gets wiped out once I reopen.
If your users had meaningfull comments to their diagrams, maybe you
should not delete those.
> I was thinking to save these NOTES in my model instead then put them
> back if the user reopens the diagram editor.
If you want to keep this kind of information, then you should include
in your model a class Note with a single attribute that would store the
user comment and update your gmf diagram to include this new element.
BRs,
Guillaume
|
|
|
Powered by
FUDForum. Page generated in 0.02755 seconds