public boolean setActivePresentation(@Nullable SQLPresentationDescriptor descriptor) throws DBException {
            if (presentationStack == null || activePresentationDescriptor == descriptor) {
                // Same presentation, no op
                return true;
            }

            if (activePresentation != null && !activePresentation.canHidePresentation(SQLEditor.this)) {
                // Presentation decided not to close
                return false;
            }

            if (descriptor == null) {
                // Just hide presentation
                activePresentationDescriptor = null;
                activePresentation = null;
                activePresentationPanel = null;

                SQLEditorPropertyTester.firePropertyChange(SQLEditorPropertyTester.PROP_CAN_EXECUTE);
                return true;
            }

            SQLEditorPresentation presentation = presentations.get(descriptor);

            if (presentation == null) {
                presentation = descriptor.createPresentation();

                if (presentation.canShowPresentation(SQLEditor.this, true)) {
                    // Must be done before doing something to presentationStack
                    presentationStackIndices.put(descriptor, presentationStack.getChildren().length);

                    final Composite placeholder = new Composite(presentationStack, SWT.NONE);
                    placeholder.setLayout(new FillLayout());

                    if (activePresentation != null) {
                        activePresentation.hidePresentation(SQLEditor.this);
                    }

                    activePresentationDescriptor = descriptor;
                    activePresentation = presentation;
                    activePresentation.createPresentation(placeholder, SQLEditor.this);
                    activePresentation.showPresentation(SQLEditor.this, true);
                    presentations.put(descriptor, activePresentation);

                    SQLEditorPropertyTester.firePropertyChange(SQLEditorPropertyTester.PROP_CAN_EXECUTE);

                    return true;
                }
            } else {
                if (presentation.canShowPresentation(SQLEditor.this, false)) {
                    if (activePresentation != null) {
                        activePresentation.hidePresentation(SQLEditor.this);
                    }

                    activePresentationDescriptor = descriptor;
                    activePresentation = presentation;
                    activePresentation.showPresentation(SQLEditor.this, false);

                    SQLEditorPropertyTester.firePropertyChange(SQLEditorPropertyTester.PROP_CAN_EXECUTE);

                    return true;
                }
            }

            return false;
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java