Search code examples
eclipseeclipse-plugineclipse-pde

Opening a view after launching in eclipse


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?


Solution

  • 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.