Hello!

I need to get control over application window (Eclipse in my case) which I'm starting in a thread in my application like this:


Thread thread = new Thread(new Runnable() {

public void run() {
org.eclipse.equinox.launcher.Main.main(new String[0]);
}
});
thread.start();


As far as I understand there are 2 ways to create a window in SWT:

1) Display d = Display.getDefault();
shell = new Shell(d);

2) Display myDisplay = new Display();
shell = new Shell(myDisplay);


There's no problem to access application's window (Shell) in first case from another thread (by calling the same Display.getDefault() ). But I'm having difficulties to deal with 2nd scenario (which Eclipse seems to use).

Could anyone help me to solve this problem?