【问题标题】:Opening a view after launching in eclipse在eclipse中启动后打开视图
【发布时间】:2009-06-10 23:06:20
【问题描述】:

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

【问题讨论】:

    标签: eclipse eclipse-plugin eclipse-pde


    【解决方案1】:

    尝试像这样包装你的电话;

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

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

    【讨论】:

    • 谢谢!这让我坚持了一周。
    猜你喜欢
    • 2013-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多