Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem with Save As functionality
Problem with Save As functionality [message #216534] Tue, 27 January 2009 18:14 Go to next message
Eclipse UserFriend
Hi everybody!

I have a problem when I try to use the Save As functionality to save my
model and I hope somebody can help me. When I have my model done in the
diagram view, if I make some changes (for example add an attribute) and
try to save the model in a new file with the Save As menu the model is
stored in a new file but it is restored to the last point when I saved it
(in this case my new attribute would not be in the new file).

I don’t know why this happens… is that the expected behaviour or is it a
bug? Do you know how can I get my new changes saved in a new file without
saving before the actual file?

Thank you very much in advance!
Re: Problem with Save As functionality [message #216778 is a reply to message #216534] Thu, 29 January 2009 18:27 Go to previous messageGo to next message
Eclipse UserFriend
Am I the only one experiencing this problem? Or is it the expected
behaviour? I tried with a very basic model and it happens too.

It’s strange that nobody saw it because I think it’s a very important
functionality (to be able to save your changes in a new file).

Can anybody help me?
Re: Problem with Save As functionality [message #216939 is a reply to message #216778] Fri, 30 January 2009 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Hello John S.,

Well, this is how saveAs is implemented currently.. You can submitt a request
to modify this bevaviour and attach proposed patch to it. Generated ???DocumentProvider.doSaveDocument()
will be called to perform actual saveAs action.

-----------------
Alex Shatalin
Re: Problem with Save As functionality [message #217050 is a reply to message #216939] Mon, 02 February 2009 08:29 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Alex for your response. So that’s how it is supposed to work…

I know that I have to make some changes in the generated
XXX.DocumentProvider.doSaveDocument() but I don’t know which changes. If I
try to do a saveAs, the “info” variable is set to “null” and I can’t
obtain the resources from the actual model. If I just try to do a simple
save, that “info” has a value, so its resources are saved.

Can you give me an example or at least some tips/hints about what should I
do?

Thank you very much!
Re: Problem with Save As functionality [message #217058 is a reply to message #217050] Mon, 02 February 2009 13:12 Go to previous messageGo to next message
Eclipse UserFriend
Well, actually that’s not true. I mean I have the model information stored
in the “diagramDocument” variable
IDiagramDocument diagramDocument = (IDiagramDocument) document;

But when the newResource is made it seems that it doesn’t have all the
information, so when its saved the actual differences between the new
model and the last saved model are not stored.

How can I store those differences in the new file? As you can see I don’t
understand this very well... Any help is appreciated! Thank you!
Re: Problem with Save As functionality [message #217139 is a reply to message #217058] Tue, 03 February 2009 07:24 Go to previous message
Eclipse UserFriend
Hello John S.,

> How can I store those differences in the new file? As you can see I
> don’t understand this very well... Any help is appreciated! Thank you!
Well, same with me. This functionality is implemented this way just because
I do not know a proper answer to this question… :-)

just an idea: try substituting URI of the current diagram resource with the
URI on “new” diagram resource (using Resiource.setURI()) and then save/reload
it.

-----------------
Alex Shatalin
Previous Topic:Change decorator being undone
Next Topic:Layout issue with Polygon in Composite Figure
Goto Forum:
  


Current Time: Tue Jul 08 13:19:56 EDT 2025

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

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

Back to the top