boolean processQueries(
            SQLScriptContext scriptContext,
            final List<SQLScriptElement> queries,
            boolean forceScript,
            final boolean fetchResults,
            boolean export,
            boolean closeTabOnError,
            SQLQueryListener queryListener
        ) {
            if (queries.isEmpty()) {
                // Nothing to process
                return false;
            }
            if (curJobRunning.get() > 0) {
                DBWorkbench.getPlatformUI().showError(
                        SQLEditorMessages.editors_sql_error_cant_execute_query_title,
                    SQLEditorMessages.editors_sql_error_cant_execute_query_message);
                return false;
            }
            final DBCExecutionContext executionContext = getExecutionContext();
            if (executionContext == null) {
                DBWorkbench.getPlatformUI().showError(
                        SQLEditorMessages.editors_sql_error_cant_execute_query_title,
                    ModelMessages.error_not_connected_to_database);
                return false;
            }
            final boolean isSingleQuery = !forceScript && (queries.size() == 1);

            // Prepare execution job
            {
                showScriptPositionRuler(true);
                QueryResultsContainer resultsContainer = getFirstResults();

                SQLEditorQueryListener listener = new SQLEditorQueryListener(this, closeTabOnError);
                if (queryListener != null) {
                    listener.setExtListener(queryListener);
                }

                if (export) {
                    List<IDataTransferProducer<?>> producers = new ArrayList<>();
                    for (SQLScriptElement element : queries) {
                        if (element instanceof SQLControlCommand controlCommand) {
                            try {
                                SQLControlResult controlResult = scriptContext.executeControlCommand(new LoggingProgressMonitor(log), controlCommand);
                                if (controlResult.getTransformed() != null) {
                                    element = controlResult.getTransformed();
                                }
                            } catch (DBException e) {
                                DBWorkbench.getPlatformUI().showError("Command error", "Error processing control command", e);
                            }
                        }
                        if (element instanceof SQLQuery query) {
                            scriptContext.fillQueryParameters(query, () -> null, false);

                            SQLQueryDataContainer dataContainer = new SQLQueryDataContainer(SQLEditor.this, query, scriptContext, log);
                            producers.add(new DatabaseTransferProducer(dataContainer, null));
                        }
                    }

                    DataTransferWizard.openWizard(
                        getSite().getWorkbenchWindow(),
                        producers,
                        null,
                        new StructuredSelection(this));
                } else {
                    boolean disableFetchCurrentResultSets;
                    if (queries.size() > QUERIES_COUNT_FOR_NO_FETCH_RESULT_SET_CONFIRMATION) {
                        if (isDisableFetchResultSet == null) {
                            UserChoiceResponse rs = DBWorkbench.getPlatformUI().showUserChoice(
                                SQLEditorMessages.sql_editor_confirm_no_fetch_result_for_big_script_title,
                                SQLEditorMessages.sql_editor_confirm_no_fetch_result_for_big_script_question,
                                List.of(
                                    SQLEditorMessages.sql_editor_confirm_no_fetch_result_for_big_script_yes,
                                    SQLEditorMessages.sql_editor_confirm_no_fetch_result_for_big_script_no
                                ),
                                List.of(SQLEditorMessages.sql_editor_confirm_no_fetch_result_for_big_script_remember), 0, 0);
                            disableFetchCurrentResultSets = rs.choiceIndex == 0;
                            if (rs.forAllChoiceIndex != null) {
                                isDisableFetchResultSet = disableFetchCurrentResultSets;
                            }
                        } else {
                            disableFetchCurrentResultSets = isDisableFetchResultSet;
                        }
                    } else {
                        disableFetchCurrentResultSets = false;
                    }
                    final SQLQueryJob job = new SQLQueryJob(getSite(),
                        isSingleQuery ? SQLEditorMessages.editors_sql_job_execute_query
                            : SQLEditorMessages.editors_sql_job_execute_script,
                        executionContext, resultsContainer, queries, scriptContext, this, listener,
                        disableFetchCurrentResultSets);

                    if (isSingleQuery) {
                        resultsContainer.query = queries.get(0);

                        closeJob();
                        curJob = job;
                        ResultSetViewer rsv = resultsContainer.getResultSetController();
                        if (rsv != null) {
                            rsv.resetDataFilter(false);
                            rsv.resetHistory();
                            rsv.refresh();
                        }
                    } else {
                        if (fetchResults) {
                            job.setFetchResultSets(true);
                        }
                        job.schedule();
                        curJob = job;
                    }
                }
            }
            return true;
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java