if (document == null) {
document = new Document(text);
viewer.setDocument(document);
+ } else {
+ document.replace(document.getLength(), 0, text);
}
- document.replace(document.getLength(), 0, text);
} catch (BadLocationException e) {
}
// viewer.setDocument(document);
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(