ProgressMonitorDialog, progressIndicator does not move [message #299614] |
Tue, 21 February 2006 05:28 |
Eclipse User |
|
|
|
Originally posted by: kvdijken.tiscali.nl
Hi all,
I want to use a ProgressMonitorDialog, but its progressIndicator does not
move. I call its run() method like this:
LoaderWithProgress operation = new LoaderWithProgress(this);
try {
new ProgressMonitorDialog(Display.getCurrent().getActiveShell())
.run(true, true, operation);
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
When I put a breakpoint in the LoaderWithProgress.run() method I see that it
is run in the main (UI) thread instead of a separate thread (although
parameter fork = true). This is not what I expected.
The LoaderWithProgress.run() method looks like this:
public void run(IProgressMonitor monitor) {
try {
monitor.beginTask("beginTask", IProgressMonitor.UNKNOWN);
doTheWork(monitor);
} finally {
monitor.done();
}
}
where doTheWork() calls monitor.work(1) and monitor.subTask() on several
occasions. I see the subtask labels change.
What am I doing wrong?
Koen
|
|
|
Powered by
FUDForum. Page generated in 0.24261 seconds