在 eclipse 中启动后打开视图

发布于 2024-07-23 15:19:37 字数 115 浏览 4 评论 0原文

我试图在 Eclipse ILaunchConfigurationDelegate 结束时以编程方式打开一个视图。 目前,当我尝试调用 showView() 时,出现“无效线程访问”错误。 如何从启动器打开视图?

I'm trying to have a view open programatically at the end of an eclipse ILaunchConfigurationDelegate. Currently I'm getting an "invalid thread access" error when I try to call showView(). How do I open a view from the launcher?

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

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

发布评论

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

评论(1

吾家有女初长成 2024-07-30 15:19:37

尝试像这样结束你的通话;

Display.getDefault().asyncExec(new Runnable() {
  public void run() {
    // Your code goes here
  }
});

这会将其放在显示线程上,并应该修复您看到的错误。

Try wrapping your call like this;

Display.getDefault().asyncExec(new Runnable() {
  public void run() {
    // Your code goes here
  }
});

This will put it on the Display thread and should fix the errors your seeing.

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