Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems saving diagrams
Problems saving diagrams [message #160003] Tue, 13 November 2007 14:33 Go to next message
Eclipse UserFriend
Originally posted by: ijerez2001.gmail.com

Hi All,

I import from a file (with a parser) and create elements depend on
token.
When I import any elements, I do a createElementCommand, and
SetBoundsCommands. Also, I specify attributes values for each one.
But when I save and then reopen (with rcp File->Open) the diagram, the
figures show in other location.
And when I save, close the application and then run again the application,
some figures don´t appear and I cannot modify (move, set property, etc.) the
figures.

Do anyone know what happen?

Thanks.
Re: Problems saving diagrams [message #160039 is a reply to message #160003] Tue, 13 November 2007 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ijerez2001.gmail.com

For more information,
I save and when I see the file xml that contain the diagram with a text
editor not have children.
And the file xml that contain the domain have the good elements.

"Iván Jerez" <ijerez2001@gmail.com> escribió en el mensaje de
noticias:fhccl7$s7c$1@build.eclipse.org...
> Hi All,
>
> I import from a file (with a parser) and create elements depend on
> token.
> When I import any elements, I do a createElementCommand, and
> SetBoundsCommands. Also, I specify attributes values for each one.
> But when I save and then reopen (with rcp File->Open) the diagram, the
> figures show in other location.
> And when I save, close the application and then run again the application,
> some figures don´t appear and I cannot modify (move, set property, etc.)
> the figures.
>
> Do anyone know what happen?
>
> Thanks.
Re: Problems saving diagrams [message #160345 is a reply to message #160039] Wed, 14 November 2007 14:47 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Iván,

Try moving your diagram element using the mouse and save the diagram. If
positions are correcntly saved/restored using this action then it looks like
you have all the elements created as a "transientChildren". In this case
you can try calling .persist() method for all views on your diagram.

-----------------
Alex Shatalin
Re: Problems saving diagrams [message #160369 is a reply to message #160345] Wed, 14 November 2007 15:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ijerez2001.msn.com

Thanks Alex, I solved my problem, it was because I used the create elements
command in the package .command from my diagram editor.
I tried with the CreateViewRequest and it work well.
Now, I create all elements, and remove the container, but when I do undo
(Ctrl+Z) don´t appear all elements. Perhaps I have to refresh the
diagram.

Thanks.

"Alex Shatalin" <vano@borland.com> escribió en el mensaje de
noticias:3c3172e61a17b8c9f4eccc3f3dfb@news.eclipse.org...
> Hello Iván,
>
> Try moving your diagram element using the mouse and save the diagram. If
> positions are correcntly saved/restored using this action then it looks
> like you have all the elements created as a "transientChildren". In this
> case you can try calling .persist() method for all views on your diagram.
>
> -----------------
> Alex Shatalin
>
>
Re: Problems saving diagrams [message #160446 is a reply to message #160369] Wed, 14 November 2007 16:18 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Iván,

Are you executing AbstractTransactionalCommand on operation history?

-----------------
Alex Shatalin
Re: Problems saving diagrams [message #160454 is a reply to message #160446] Wed, 14 November 2007 16:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ijerez2001.msn.com

How can I execute a AbstractTransactionalCommand?
Never I have used it.
Thanks.

"Alex Shatalin" <vano@borland.com> escribió en el mensaje de
noticias:3c3172e61a18d8c9f4f99129149b@news.eclipse.org...
> Hello Iván,
>
> Are you executing AbstractTransactionalCommand on operation history?
>
> -----------------
> Alex Shatalin
>
>
Re: Problems saving diagrams [message #160460 is a reply to message #160454] Wed, 14 November 2007 17:00 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Iván,

You have to subclass this abstract class and then pass new instance of your
custom command to operation history like this: OperationHistoryFactory.getOperationHistory().execute().

-----------------
Alex Shatalin
Previous Topic:"Misc" parent node in properties - rename
Next Topic:Forbid move an element to other container
Goto Forum:
  


Current Time: Fri Apr 19 05:18:49 GMT 2024

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

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

Back to the top