Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How can i trigger refresh diagram from command
How can i trigger refresh diagram from command [message #1059842] Tue, 21 May 2013 16:25 Go to next message
serhat gezgin is currently offline serhat gezgin
Messages: 231
Registered: January 2013
Location: Izmir
Senior Member
Hi all

I want to refesh diagram automaticaly from java code.

For example on CreatingXXXElementCommand class how can i trigger refresh diagram ?

But i cant find how can done this so anyone can help me ?

Regards
Re: How can i trigger refresh diagram from command [message #1060250 is a reply to message #1059842] Thu, 23 May 2013 13:00 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas Beyer
Messages: 55
Registered: February 2013
Member
Hi Serhat,

check:
org.eclipse.gmf.tooling.runtime.update.UpdateDiagramCommand

It show, what to do in order to refresh elements.
This IHandler is the registered hook for the F5 key binding.

Regards
Thomas
Re: How can i trigger refresh diagram from command [message #1061019 is a reply to message #1060250] Wed, 29 May 2013 10:22 Go to previous message
serhat gezgin is currently offline serhat gezgin
Messages: 231
Registered: January 2013
Location: Izmir
Senior Member
Hi,

I use

import org.eclipse.gmf.tooling.runtime.update.UpdateDiagramCommand;

UpdateDiagramCommand updater = new UpdateDiagramCommand();
		try {
			updater.execute(null);
		} catch (ExecutionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}


and its work perfect but i need to ask u i give null as ExecutionEvent

is it right way ?

Regards
Previous Topic:GMF Outline dont show my model hierarchy
Next Topic:GMF creating xtext file as model
Goto Forum:
  


Current Time: Sun Apr 20 12:19:52 EDT 2014

Powered by FUDForum. Page generated in 0.01676 seconds