for (int i = 0; i < workbenchWindows.length; i++) {
IWorkbenchWindow window = workbenchWindows[i];
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
IViewPart part = page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
if (part != null && part instanceof IConsoleView) {
ConsoleView view = (ConsoleView) part;
if (list.contains(view.getConsole())) {
Control control = view.getCurrentPage().getControl();
if (!control.isDisposed()) {