Lines 11-16
Link Here
|
11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
12 |
package org.eclipse.jface.dialogs; |
12 |
package org.eclipse.jface.dialogs; |
13 |
|
13 |
|
|
|
14 |
import org.eclipse.core.runtime.Assert; |
14 |
import org.eclipse.jface.layout.GridDataFactory; |
15 |
import org.eclipse.jface.layout.GridDataFactory; |
15 |
import org.eclipse.jface.layout.GridLayoutFactory; |
16 |
import org.eclipse.jface.layout.GridLayoutFactory; |
16 |
import org.eclipse.jface.layout.LayoutConstants; |
17 |
import org.eclipse.jface.layout.LayoutConstants; |
Lines 274-279
Link Here
|
274 |
} |
275 |
} |
275 |
if (shell == null || shell.isDisposed()) { |
276 |
if (shell == null || shell.isDisposed()) { |
276 |
display = Display.getCurrent(); |
277 |
display = Display.getCurrent(); |
|
|
278 |
// The dialog should be always instantiated in UI thread. |
279 |
// However it was possible to instantiate it in other threads |
280 |
// (the code worked in most cases) so the assertion covers |
281 |
// only the failing scenario. See bug 107082 for details. |
282 |
Assert.isNotNull(display, |
283 |
"The dialog should be created in UI thread"); //$NON-NLS-1$ |
277 |
} else { |
284 |
} else { |
278 |
display = shell.getDisplay(); |
285 |
display = shell.getDisplay(); |
279 |
} |
286 |
} |