Eclispe没有显示用户线程的进度条 [英] Eclispe does not show progress bar of user threads
本文介绍了Eclispe没有显示用户线程的进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在eclipse启动时创建了一些用户工作,但在启动工作台之后,我无法看到进度条。有没有提到这些线程,而不是让他们的用户线程?
I created some user jobs on start-up of eclipse, but after launching the workbench I am not able to see the progress bar. Is there anywhere I have to mention these threads other than making them user threads?
protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask("Download", -1);
for (ProxyBean network : ProxyBean.get()) {
// do something
}
monitor.done();
return Status.OK_STATUS;
}
我以这种方式初始化:
job = new MyJob();
job.setUser(true);
job.schedule();`
推荐答案
检查您是否在正确的shell上应用它,或者作业的执行时间太低,以至于您看不到进度条。
Check whether you are applying it on correct shell, or the execution time of job is too low so that you can not see the progress bar..
您还可以使用:
// Update the user interface asynchronously
Display.getDefault().asyncExec(new Runnable() {
public void run() {
// ... do any work that updates the screen ...
}
});
这篇关于Eclispe没有显示用户线程的进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文