1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

make LaunchUIPlugin.getShell() always return a shell

This commit is contained in:
David Inglis 2003-01-29 14:13:43 +00:00
parent b75007a384
commit f92700e14b
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,7 @@
2003-01-29 David Inglis
* src/.../launch/internal/ui/LaunchUIPluging.java (getShell)
change so that it will always return a shell.
2003-01-28 Alain Magloire 2003-01-28 Alain Magloire
* src/.../launch/internal/CApplicationLaunchShortCut.java (getCLaunchConfigType): * src/.../launch/internal/CApplicationLaunchShortCut.java (getCLaunchConfigType):

View file

@ -57,18 +57,17 @@ public class LaunchUIPlugin extends AbstractUIPlugin
} }
public static Shell getShell() { public static Shell getShell() {
Shell shell = null; if (getActiveWorkbenchShell() != null) {
if (getActiveWorkbenchWindow() != null) { return getActiveWorkbenchShell();
shell = getActiveWorkbenchWindow().getShell(); } else {
}
if ( shell == null ) {
if ( debugDialogShell != null ) { if ( debugDialogShell != null ) {
if (!debugDialogShell.isDisposed() ) if (!debugDialogShell.isDisposed() )
return debugDialogShell; return debugDialogShell;
debugDialogShell = null; debugDialogShell = null;
} }
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
return windows[0].getShell();
} }
return shell;
} }
public static void setDialogShell(Shell shell) { public static void setDialogShell(Shell shell) {