private void dumpOutput(DBRProgressMonitor monitor) {
            SQLEditorOutputViewer currentOutputViewer = outputViewer;
            if (currentOutputViewer == null || currentOutputViewer.isDisposed()) {
                return;
            }

            List<ServerOutputInfo> outputs;
            synchronized (serverOutputs) {
                outputs = new ArrayList<>(serverOutputs);
                serverOutputs.clear();
            }

            List<PrintWriter> addInWriters = addIns.stream()
                .map(SQLEditorAddIn::getServerOutputConsumer)
                .filter(Objects::nonNull)
                .toList();

            final DBCOutputWriter outputWriter = new DBCOutputWriter() {
                @Override
                public void println(@Nullable DBCOutputSeverity severity, @Nullable String message) {
                    currentOutputViewer.println(severity, message);

                    if (message != null) {
                        for (PrintWriter writer : addInWriters) {
                            writer.println(message);
                        }
                    }
                }

                @Override
                public void flush() {
                    currentOutputViewer.flush();

                    for (PrintWriter writer : addInWriters) {
                        writer.flush();
                    }
                }
            };

            if (!outputs.isEmpty()) {
                for (ServerOutputInfo info : outputs) {
                    if (monitor.isCanceled()) {
                        break;
                    }
                    try {
                        info.outputReader.readServerOutput(monitor, info.executionContext, info.result, null, outputWriter);
                    } catch (Exception e) {
                        log.error(e);
                    }
                }
            }

            if (!monitor.isCanceled()) {
                // Check running queries for async output
                DBCServerOutputReader outputReader = null;
                final DBCExecutionContext executionContext = getExecutionContext();
                if (executionContext != null) {
                    final DBPDataSource dataSource = executionContext.getDataSource();
                    // Dump server output
                    outputReader = DBUtils.getAdapter(DBCServerOutputReader.class, dataSource);
                }
                if (outputReader != null && outputReader.isAsyncOutputReadSupported()) {
                    for (QueryProcessor qp : queryProcessors) {
                        SQLQueryJob queryJob = qp.curJob;
                        if (queryJob != null) {
                            DBCStatement statement = queryJob.getCurrentStatement();
                            try {
                                if (statement != null && !statement.isStatementClosed()) {
                                    outputReader.readServerOutput(monitor, executionContext, null, statement, outputWriter);
                                }
                            } catch (DBCException e) {
                                log.error(e);
                            }
                        }
                    }
                }
            }

            outputWriter.flush();
            if (currentOutputViewer == null || currentOutputViewer.isDisposed() || !currentOutputViewer.isHasNewOutput()) {
                return;
            }
            currentOutputViewer.resetNewOutput();
            // Show output log view if needed
            UIUtils.asyncExec(() -> {
                currentOutputViewer.getViewer().scrollToEnd();
                if (getActivePreferenceStore().getBoolean(SQLPreferenceConstants.OUTPUT_PANEL_AUTO_SHOW)) {
                    ToolItem toolItem = getViewToolItem(SQLEditorCommands.CMD_SQL_SHOW_OUTPUT);
                    if (toolItem != null && !toolItem.getSelection()) {
                        showOutputPanel(true);
                    }
                }
/*
                if (outputViewer!=null) {
                    if (outputViewer.getControl()!=null) {
                        if (!outputViewer.isDisposed()) {
                            outputViewer.scrollToEnd();
                            updateOutputViewerIcon(true);
                        }
                    }
                }
*/
            });
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java