Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Refresh Editor After Executing Commands
Refresh Editor After Executing Commands [message #180444] Wed, 02 April 2008 10:00 Go to next message
Asha is currently offline Asha
Messages: 18
Registered: July 2009
Junior Member
How to refresh the editor after executing the command?

I am using Abstract transaction command to modify the underlying model.
The model is gvetting modified properly and i am able to save the domain
and diagram file properly. But the changes are not getting reflected in
the editor. To see the changes i need to close and reopen the file.

Any idea how to achieve editor refresh without reopening it?
Re: Refresh Editor After Executing Commands (Solved) [message #182817 is a reply to message #180444] Mon, 14 April 2008 01:56 Go to previous messageGo to next message
Asha is currently offline Asha
Messages: 18
Registered: July 2009
Junior Member
Asha wrote:

> How to refresh the editor after executing the command?

> I am using Abstract transaction command to modify the underlying model.
> The model is gvetting modified properly and i am able to save the domain
> and diagram file properly. But the changes are not getting reflected in
> the editor. To see the changes i need to close and reopen the file.

> Any idea how to achieve editor refresh without reopening it?

I solved this problem by saving the domain and diagram file, and
restting the editor;s input to the saved(updated) model.

diagramFileResource.save(null);

domainFileResource.save(null);

diagramEditor.setInput(diagramEditor.getEditorInput());

refreshes the editor by adding / deleting the diagram elements without
reopening the editor
Re: Refresh Editor After Executing Commands (Solved) [message #688433 is a reply to message #182817] Fri, 24 June 2011 13:12 Go to previous message
Preethi  is currently offline Preethi
Messages: 4
Registered: May 2011
Junior Member
Hello Asha,
I have a problem with gmf editor refresh.
In my class i take element from file and do some operations..based on which some of element's properties gets updated.
If i do save of element back to file using resource.save() changes go to file..It updates even property view..but outline and my editor state remains inconsistent..No context menu on outline gets enabled since Transactional editing domain becomes null..
On close and open all works fine..
Can you help me with this...

Regards,
Preethi
Previous Topic:Exception while generation diagram code
Next Topic:UI not updating after i change the domain model
Goto Forum:
  


Current Time: Fri Apr 25 03:01:04 EDT 2014

Powered by FUDForum. Page generated in 0.04375 seconds