Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » ProgressMonitor on GMF Command
ProgressMonitor on GMF Command [message #489763] Mon, 05 October 2009 15:33 Go to next message
Eclipse UserFriend
Hi,

I come to use more and more edit policies for my stuff and ran into the problem, that really long command don't create a progress monitor. They seem to run in the UI Thread, which is not suitable for me, since some commands take several seconds.

Is there a way for running a command with progressmonitor when it gets created by my edit policy?

For example:

I created a OpenEditPolicy that returns a custom command that generates a diagram and opens it. Since it can be a really big diagram, it takes a while to create the diagrams and my UI freezes.
Normally I could execute the command in a Job to let it run in the background or at least show the user progress, but since the edit policy returns the command to some other classes I don't have access to the way it gets executed? Or at least I don't see where I can access it.

Help is very appreciated Smile

Best regards,
Artur
Re: ProgressMonitor on GMF Command [message #490525 is a reply to message #489763] Thu, 08 October 2009 19:30 Go to previous message
Eclipse UserFriend
Hi,

Quote:

Is there a way for running a command with progressmonitor when it gets created by my edit policy?



Wrap the long running task inside an IRunnableWithProgress and execute it (inside the command that is returned by your edit policy) using a ProgressMonitorDialog.


Best regards,

sas
Previous Topic:Double clicking event?
Next Topic:Error new Ecore Model
Goto Forum:
  


Current Time: Sun Jul 06 09:38:35 EDT 2025

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

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

Back to the top