eclipse plugin: let's return the first Workbench Window...
...if we have any rather then the active one that might be 'null'
This commit is contained in:
parent
2272449226
commit
074b7771a3
1 changed files with 3 additions and 1 deletions
|
@ -54,6 +54,8 @@ public class WorkspaceUtils
|
|||
}
|
||||
public static IWorkbenchWindow getWorkbenchWindow()
|
||||
{
|
||||
return Activator.getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||
if (Activator.getDefault().getWorkbench().getWorkbenchWindowCount() == 0)
|
||||
return null;
|
||||
return Activator.getDefault().getWorkbench().getWorkbenchWindows()[0];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue