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:
parent
625103658e
commit
5ab5c04a65
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue