Skip to content

Instantly share code, notes, and snippets.

@suxiaogang
Last active December 19, 2015 08:29
Show Gist options
  • Save suxiaogang/5926528 to your computer and use it in GitHub Desktop.
Save suxiaogang/5926528 to your computer and use it in GitHub Desktop.
ProgressMonitorDialog.java
ProgressMonitorDialog progress = new ProgressMonitorDialog(null);
try {
progress.run(false, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) {
monitor.beginTask("WORK NAME", IProgressMonitor.UNKNOWN);
try {
//do something
} catch (Exception e) {
e.printStackTrace();
} finally {
monitor.done();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment