Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Saving diagram drawn on the GMF Editor(Saving diagram drawn on the GMF Editor)
Saving diagram drawn on the GMF Editor [message #758207] Tue, 22 November 2011 10:46 Go to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi All,

Is it possible to save the diagram which is drawn on the GMF Editor ?

Like If I draw some diagram on GMF Editor, When I open it next time I should be able to retrieve the diagram... This would save a lot of time from creating a diagram which is similar to my previous diagram.

Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758215 is a reply to message #758207] Tue, 22 November 2011 11:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26015
Registered: July 2009
Senior Member
Of course the editor saves and lets you reload what you saved.

On 22/11/2011 11:46 AM, vinny503 wrote:
> Hi All,
>
> Is it possible to save the diagram which is drawn on the GMF Editor ?
>
> Like If I draw some diagram on GMF Editor, When I open it next time I
> should be able to retrieve the diagram... This would save a lot of
> time from creating a diagram which is similar to my previous diagram.
>
> Regards,
> Vinay
Re: Saving diagram drawn on the GMF Editor [message #758228 is a reply to message #758215] Tue, 22 November 2011 11:49 Go to previous messageGo to next message
Hoang  is currently offline Hoang
Messages: 45
Registered: September 2011
Location: Milan
Member
Vinay,

You just forgot to hit the Save button! I think GMF is all about displaying data and persisting data, if it is not capable of persisting data, then there is no purpose for such a framework.

Hoang.
Re: Saving diagram drawn on the GMF Editor [message #758229 is a reply to message #758215] Tue, 22 November 2011 11:50 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi Ed Merks,

Can you please tell me, How to acheive that ? Or Can you please provide any links that gives information on saving the diagram.

Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758244 is a reply to message #758228] Tue, 22 November 2011 12:31 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi Hoang,

I have hit the save button but we have implemented some logic for our application because of that we are not able to retain the diagram.

Is it possible to have a Project Explorer window where we could save all the diagrams created. Now we are having a property window similarly having another window called Project Explorer which will have all the diagrams saved.

Regards,
vinay
Re: Saving diagram drawn on the GMF Editor [message #758249 is a reply to message #758229] Tue, 22 November 2011 12:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26015
Registered: July 2009
Senior Member
Vinay,

The generated editor supports File->Save.

On 22/11/2011 12:50 PM, vinny503 wrote:
> Hi Ed Merks,
>
> Can you please tell me, How to acheive that ? Or Can you please
> provide any links that gives information on saving the diagram.
>
> Regards,
> Vinay
>
Re: Saving diagram drawn on the GMF Editor [message #758258 is a reply to message #758249] Tue, 22 November 2011 13:20 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi Ed Merks,

Why "File->Save As..." is disabled ??

Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758263 is a reply to message #758258] Tue, 22 November 2011 13:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26015
Registered: July 2009
Senior Member
Vinay,

It's disabled until you make the first change.


On 22/11/2011 2:20 PM, vinny503 wrote:
> Hi Ed Merks,
>
> Why "File->Save As..." is disabled ??
>
> Regards,
> Vinay
Re: Saving diagram drawn on the GMF Editor [message #758396 is a reply to message #758263] Wed, 23 November 2011 06:03 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi,

Even after First change it is disabled and I notice that it is never enabled .Please let me know how do I enable it.

Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758397 is a reply to message #758396] Wed, 23 November 2011 06:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26015
Registered: July 2009
Senior Member
Vinay,

This just works out of the box, so you've changed something, right? You
checked what's going on with isDirty?

On 23/11/2011 7:03 AM, vinny503 wrote:
> Hi,
>
> Even after First change it is disabled and I notice that it is never
> enabled .Please let me know how do I enable it.
>
> Regards,
> Vinay
Re: Saving diagram drawn on the GMF Editor [message #758421 is a reply to message #758397] Wed, 23 November 2011 08:59 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi,

Where I can find isDirty ? And I am trying in a newly created project, I have not changed anything in the RCP code .


Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758480 is a reply to message #758421] Wed, 23 November 2011 12:22 Go to previous messageGo to next message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi Ed Merks,

I was asking about saving the previous diagram, But Is it possible to save all the diagrams, Like I draw different diagrams whenever I open a GMF Editor, So When I open it next time, Is it possible to retain the diagram which I have drawn 1st. Like saving it in hard disk.

Regards,
Vinay
Re: Saving diagram drawn on the GMF Editor [message #758497 is a reply to message #758480] Wed, 23 November 2011 13:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26015
Registered: July 2009
Senior Member
Vinay,

You seem to be repeating yourself. If you open your generated editor
and hit Ctrl-O twice, you should be able to find the isDirty method.
Every thing a command is executed the editor should test this state again...


On 23/11/2011 1:22 PM, vinny503 wrote:
> Hi Ed Merks,
>
> I was asking about saving the previous diagram, But Is it possible to
> save all the diagrams, Like I draw different diagrams whenever I open
> a GMF Editor, So When I open it next time, Is it possible to retain
> the diagram which I have drawn 1st. Like saving it in hard disk.
>
> Regards,
> Vinay
Re: Saving diagram drawn on the GMF Editor [message #758506 is a reply to message #758497] Wed, 23 November 2011 13:54 Go to previous message
vinny503 Missing name is currently offline vinny503 Missing name
Messages: 156
Registered: August 2011
Senior Member
Hi,

I am able to find isDirty() method in DiagramDocumentEditor class which is being extended by xxxDiagramEditor.java file, But since it is not present in xxxDiagramEditor.java file,So the Save and Save All will be enabled, But Save As...is still disabled.

Regards,
Vinay
Previous Topic:call of toString() method in xxxImpl.java class in GMF
Next Topic:comboboxcelleditor not firing
Goto Forum:
  


Current Time: Wed Sep 03 07:07:18 GMT 2014

Powered by FUDForum. Page generated in 0.10685 seconds