'Thread UI'에 해당되는 글 1건

ProgressMonitor with UI

Eclipse 2010. 8. 11. 18:03

IRunnableWithProgress runnable = new IRunnableWithProgress()
{

 public void run(IProgressMonitor progressMonitor)
 {

  ...
  progressMonitor.beginTask("Generating DDL(s)", count);

  ...

  }

  progressMonitor.done();
 }
};

progressMonitor.run(false, true, runnable); <- fork should be false

* void org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException

If fork is set to false, the runnable will run in the UI thread and it is the runnable's responsibility to call Display.readAndDispatch() to ensure UI responsiveness.

Posted by zennken
1

zennken

달력