@Nullable
    private String getTransactionStatusText() throws DBCException {
        if (dataSourceContainer == null) {
            return null;
        }

        final long lastUserActivityTime = DataSourceMonitorJob.getLastUserActivityTime();
        if (lastUserActivityTime < 0) {
            return null;
        }

        final long currentTime = System.currentTimeMillis();
        final long elapsedSeconds = (currentTime - lastUserActivityTime) / 1000;
        if (elapsedSeconds < 60) {
            return null;
        }

        final DBCExecutionContext executionContext = getExecutionContext();
        final DBCTransactionManager txnManager = DBUtils.getTransactionManager(executionContext);
        final QMTransactionState txnState = QMUtils.getTransactionState(executionContext);

        final boolean isTransactionInProgress = txnManager != null
            && txnManager.isSupportsTransactions()
            && !txnManager.isAutoCommit()
            && txnState.getUpdateCount() > 0;

        final long disconnectTimeoutSeconds = DataSourceMonitorJob.getDisconnectTimeoutSeconds(dataSourceContainer);
        final long rollbackTimeoutSeconds = DataSourceMonitorJob.getTransactionTimeoutSeconds(dataSourceContainer);

        if ((isTransactionInProgress && rollbackTimeoutSeconds > 0) &&
            (rollbackTimeoutSeconds > elapsedSeconds) &&
            (disconnectTimeoutSeconds <= 0 || rollbackTimeoutSeconds < disconnectTimeoutSeconds) &&
            !DBExecUtils.isExecutionInProgress(dataSourceContainer.getDataSource())
        ) {
            return NLS.bind(
                SQLEditorMessages.sql_editor_status_bar_rollback_label,
                RuntimeUtils.formatExecutionTime(Duration.ofSeconds(rollbackTimeoutSeconds - elapsedSeconds))
            );
        } else if (disconnectTimeoutSeconds > 0 && disconnectTimeoutSeconds > elapsedSeconds) {
            return NLS.bind(
                SQLEditorMessages.sql_editor_status_bar_disconnect_label,
                RuntimeUtils.formatExecutionTime(Duration.ofSeconds(disconnectTimeoutSeconds - elapsedSeconds))
            );
        } else {
            return null;
        }
    }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java