mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
make LaunchUIPlugin.getShell() always return a shell
This commit is contained in:
parent
b75007a384
commit
f92700e14b
2 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
||||
* src/.../launch/internal/CApplicationLaunchShortCut.java (getCLaunchConfigType):
|
||||
|
|
|
@ -57,18 +57,17 @@ public class LaunchUIPlugin extends AbstractUIPlugin
|
|||
}
|
||||
|
||||
public static Shell getShell() {
|
||||
Shell shell = null;
|
||||
if (getActiveWorkbenchWindow() != null) {
|
||||
shell = getActiveWorkbenchWindow().getShell();
|
||||
}
|
||||
if ( shell == null ) {
|
||||
if (getActiveWorkbenchShell() != null) {
|
||||
return getActiveWorkbenchShell();
|
||||
} else {
|
||||
if ( debugDialogShell != null ) {
|
||||
if (!debugDialogShell.isDisposed() )
|
||||
return debugDialogShell;
|
||||
debugDialogShell = null;
|
||||
}
|
||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
||||
return windows[0].getShell();
|
||||
}
|
||||
return shell;
|
||||
}
|
||||
|
||||
public static void setDialogShell(Shell shell) {
|
||||
|
|
Loading…
Add table
Reference in a new issue