@Override
        public void onEndQuery(final DBCSession session, final SQLQueryResult result, DBCStatistics statistics) {
            try {
                synchronized (runningQueries) {
                    runningQueries.remove(result.getStatement());
                }
                queryProcessor.curJobRunning.updateAndGet(i -> i > 0 ? i - 1 : i);
                if (getTotalQueryRunning() <= 0) {
                    UIUtils.asyncExec(() -> {
                        if (isDisposed()) {
                            return;
                        }
                        setTitleImage(editorImage);
                        updateDirtyFlag();
                    });
                }

                if (isDisposed()) {
                    return;
                }
                UIUtils.runUIJob("Process SQL query result", monitor -> {
                    if (isDisposed()) {
                        return;
                    }
                    // Finish query
                    processQueryResult(monitor, result, statistics);
                    // Update dirty flag
                    updateDirtyFlag();
                    refreshActions();
                });
            } finally {
                if (extListener != null) {
                    extListener.onEndQuery(session, result, statistics);
                }
            }
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java