1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

watch exception when getting shell

This commit is contained in:
David McKnight 2006-08-08 13:01:51 +00:00
parent 625103658e
commit 5ab5c04a65

View file

@ -3123,10 +3123,17 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
Shell result = null;
if (PlatformUI.isWorkbenchRunning())
{
IWorkbenchWindow window = getActiveWorkbenchWindow();
if (window != null)
try
{
result = window.getShell();
IWorkbenchWindow window = getActiveWorkbenchWindow();
if (window != null)
{
result = window.getShell();
}
}
catch (Exception e)
{
return null;
}
}
else // workbench has not been loaded yet!