Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Copying Notes data from Palette to ecore model(How to transfer the Notes object of the palette to your model)
Copying Notes data from Palette to ecore model [message #821005] Wed, 14 March 2012 16:52 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:[SOLVED] Cannot move figure when handleNotificationEvent is edited??
Next Topic:GMF without Ecore model
Goto Forum:
  


Current Time: Sun Nov 09 18:38:46 EST 2025

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

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

Back to the top