mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 05:19:10 +00:00
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
@ -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…
x
Reference in New Issue
Block a user