From: khartlage Date: Fri, 28 Feb 2003 20:34:51 +0000 (+0000) Subject: Fied console NPE X-Git-Url: http://secure.phpeclipse.com Fied console NPE --- 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(