IProgressMonitor如何暂停?

发布于 2024-08-27 21:07:17 字数 87 浏览 5 评论 0原文

如何在 Eclipse 视图中向 IProgressMonitor 添加暂停按钮。我只找到了圣坛按钮。它工作正常,但我必须执行暂停操作。

谢谢!

How I can add an pause button to IProgressMonitor at an eclipse view. I have found only the chancel button. It works correctly, but I have to do an pause operation.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

双马尾 2024-09-03 21:07:17

它无法通过 接口。唯一可以做的就是 setCancel(),即使这样也不能 100% 保证它正在执行的任务将被取消。只有实际作业支持/并且可以取消任务时,才可以取消任务。

另外,“暂停”在语义上究竟意味着什么?您想锁定资源并等待吗?多长时间?我认为,诸如此类的事情会成为反对使用该方法的理由。

It is not available via the interface. The only thing that can be done is to setCancel() and even that does not 100% guarantee that the task it is performing will be cancelled. The tasks can be cancelled only if the actual job supports/and can perform cancelling.

Also what exactly would a "pause" semantically mean? Do you want to lock resources and wait? For how long? Things like these would have been arguments against having the method, I think.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文