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

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