Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ProgressMonitor on GMF Command
ProgressMonitor on GMF Command [message #489763] Mon, 05 October 2009 19:33 Go to next message
Artur Kronenberg is currently offline Artur KronenbergFriend
Messages: 159
Registered: August 2009
Senior Member
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 23:30 Go to previous message
No real name is currently offline No real nameFriend
Messages: 31
Registered: September 2009
Member
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: Mon May 06 07:54:58 GMT 2024

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

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

Back to the top