1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 07:15:39 +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

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