public void showExtraPresentation(@Nullable SQLPresentationDescriptor presentation) {
        if (extraPresentationManager.activePresentationDescriptor == presentation || presentationStack == null) {
            return;
        }

        if (presentation != null && !presentation.isEnabled(getSite())) {
            return;
        }

        StackLayout stackLayout = (StackLayout) presentationStack.getLayout();

        try {
            if (!extraPresentationManager.setActivePresentation(presentation)) {
                return;
            }
        } catch (DBException e) {
            log.error("Error creating presentation", e);
        }

        resultsSash.setRedraw(false);

        try {
            if (extraPresentationManager.activePresentation == null) {
                stackLayout.topControl = presentationStack.getChildren()[0];
                getSite().setSelectionProvider(new DynamicSelectionProvider());
            } else {
                stackLayout.topControl = extraPresentationManager.getActivePresentationControl();
                getSite().setSelectionProvider(extraPresentationManager.activePresentation.getSelectionProvider());
            }

            // Show presentation panels
            boolean sideBarChanged = false;

            {
                // Remove all presentation panel toggles
                for (Control vb : presentationSwitchFolder.getChildren()) {
                    if (vb.getData() instanceof SQLPresentationPanelDescriptor) { // || vb instanceof Label
                        vb.dispose();
                        sideBarChanged = true;
                    }
                }
                // Close all panels
                for (CTabItem tabItem : resultTabs.getItems()) {
                    if (tabItem.getData() instanceof SQLEditorPresentationPanel) {
                        tabItem.dispose();
                    }
                }
                extraPresentationManager.activePresentationPanel = null;
            }

            if (extraPresentationManager.activePresentation != null) {
                // Check and add presentation panel toggles
                final List<SQLPresentationPanelDescriptor> panels = extraPresentationManager.activePresentationDescriptor.getPanels();
                for (SQLPresentationPanelDescriptor panelDescriptor : panels) {
                    removeToggleLayoutButton();
                    sideBarChanged = true;
                    PresentationPanelToggleAction toggleAction = new PresentationPanelToggleAction(panelDescriptor);
                    VerticalButton panelButton = new VerticalButton(presentationSwitchFolder, SWT.RIGHT);
                    panelButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
                    panelButton.setAction(toggleAction, true);
                    panelButton.setData(panelDescriptor);
                    if (panelDescriptor.isAutoActivate()) {
                        //panelButton.setChecked(true);
                        toggleAction.run();
                    }
                    createToggleLayoutButton();
                }
            }

            switchPresentationSQLButton.setChecked(presentation == null);

            for (VerticalButton button : switchPresentationExtraButtons) {
                button.setChecked(presentation != null && button.getData() == presentation);
            }

            presentationSwitchFolder.layout(true);
            presentationSwitchFolder.redraw();

            if (sideBarChanged) {
                topBarMan.update(true);
                bottomBarMan.update(true);
                topBarMan.getControl().getParent().layout(true);
                bottomBarMan.getControl().getParent().layout(true);
            }

            presentationStack.layout(true, true);

            UIUtils.asyncExec(() -> {
                if (extraPresentationManager.activePresentation == null) {
                    setFocusToTextControl();
                } else {
                    extraPresentationManager.getActivePresentationControl().setFocus();
                }
            });

        } finally {
            resultsSash.setRedraw(true);
        }
    }
Return true if there is an active tab, and its container is pinned
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java