private static IWorkbenchWindow getWorkbenchWindow(IWorkbench workbench) {
		IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
		if (workbenchWindow != null) {
			return workbenchWindow;
		}
		IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
		for (IWorkbenchWindow window : windows) {
			if (window != null) {
				return window;
			}
		}
		return null;
	}
Logs an error message with the responsible error included.

@param message The message to display.
@param t The responsible throwable.
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/EclipseMessageUtils.java