From f4bba67da5a77c25289f56268af097d37a9534dd Mon Sep 17 00:00:00 2001 From: khartlage Date: Fri, 28 Feb 2003 20:34:51 +0000 Subject: [PATCH] Fied console NPE --- .../sourceforge/phpeclipse/views/PHPConsole.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java index 7bf0f41..a858f5c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java @@ -117,13 +117,14 @@ public class PHPConsole extends ViewPart { public static PHPConsole getInstance() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); PHPConsole console = (PHPConsole) page.findView(PHPConsole.CONSOLE_ID); - if (console == null) { - console = (PHPConsole) page.findView(PHPConsole.CONSOLE_ID); - } + if (PHPeclipsePlugin.getDefault().getPreferenceStore().getBoolean(PHPeclipsePlugin.SHOW_OUTPUT_IN_CONSOLE) == true) { try { page.showView(PHPConsole.CONSOLE_ID); + if (console == null) { + console = (PHPConsole) page.findView(PHPConsole.CONSOLE_ID); + } } catch (PartInitException e) { PHPeclipsePlugin.getDefault().getLog().log( new Status( -- 1.7.1