private void showExtraView(
        @NotNull final String commandId,
        @NotNull String name,
        @NotNull String toolTip,
        @NotNull Image image,
        @NotNull Control view,
        @Nullable IActionContributor actionContributor,
        @Nullable Boolean show // true - show, false - hide, null - toggle
    ) {
        ToolItem viewItem = getViewToolItem(commandId);
        if (viewItem == null) {
            log.warn("Tool item for command " + commandId + " not found");
            return;
        }
        CTabFolder tabFolder = this.getFolderForExtraPanels();
        CTabItem curItem = getExtraViewTab(view);
        if (curItem != null) {
            if (show == null || !show) {
                // Close tab if it is already open
                viewItem.setSelection(false);
                curItem.dispose();
            }
            return;
        }
        if (show != null && !show) {
            return;
        }

        boolean isTabsToTheRight = tabFolder == sqlExtraPanelFolder;

        if (isTabsToTheRight) {
            if (sqlExtraPanelSash.getMaximizedControl() != null) {
                sqlExtraPanelSash.setMaximizedControl(null);
            }
        } else {
            sqlExtraPanelSash.setMaximizedControl(sqlExtraPanelSash.getChildren()[0]);
            // Show results
            showResultsPanel(true);
        }

        if (view == outputViewer) {
            updateOutputViewerIcon(false);
            outputViewer.resetNewOutput();
        }
        // Create new tab
        viewItem.setSelection(true);

        CTabItem item = new CTabItem(tabFolder, SWT.CLOSE);
        item.setControl(view);
        item.setText(name);
        item.setToolTipText(toolTip);
        item.setImage(image);
        item.setData(view);
        item.setData("actionContributor", actionContributor);
        // De-select tool item on tab close
        item.addDisposeListener(e -> {
            if (!viewItem.isDisposed()) {
                viewItem.setSelection(false);
            }
            if (tabFolder.getItemCount() == 0) {
                sqlExtraPanelSash.setMaximizedControl(sqlExtraPanelSash.getChildren()[0]);
            }
        });
        tabFolder.setSelection(item);

        if (isTabsToTheRight) {
            updateExtraViewToolbar(actionContributor);
        }
    }
Changes mode of showing result for script execution - multiple results per tab or one tab per result.
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java