Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problems with WorkspaceModifyOperation and IProgressService.run(...)
Problems with WorkspaceModifyOperation and IProgressService.run(...) [message #335509] Fri, 10 April 2009 19:13 Go to next message
Eclipse UserFriend
Originally posted by: ofrijole.hotmail.com

I can't figure out how to use the progress monitor supplied to the
execute(...) method of a WorkspaceModifyOperation. For instance, when I
call monitor.worked(1) it doesn't do anything to the progress monitor
(which was launched using
PlatformUI.getWorkbench().getProgressService().run(...)). The monitor
appears to be wrapped and altered to the point that it doesn't seem to
respond to worked events.

Is it likely that I'm doing something wrong?
Re: Problems with WorkspaceModifyOperation and IProgressService.run(...) [message #335511 is a reply to message #335509] Fri, 10 April 2009 19:50 Go to previous message
Eclipse UserFriend
Originally posted by: ofrijole.hotmail.com

Well, I found the answer to my own question (had to dig through the code
in the debugger). The problem is that WorkspaceModifyOperation doesn't
pass the progress monitor (created by the progress service) cleanly
through. Instead, it wraps it in a customized SubProgressMonitor. If you
pass UNKNOWN when calling beginTask() within the
WorkspaceModifyOperation.execute(...) implementation, the monitor
silently accepts the argument but subsequent worked(int) calls have no
effect.

Unfortunately, I can't predict the amount of work in several cases, so
I'll have to find some solution other than using
WorkspaceModifyOperation to manage resource locking, etc.
Previous Topic:manual eclipse update failed
Next Topic:CNF: New project wizard > right-click menu > always enabled
Goto Forum:
  


Current Time: Fri Nov 08 21:50:09 GMT 2024

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

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

Back to the top