@Override
        public ISelectionProvider getProvider() {
            if (extraPresentationManager.activePresentation != null) {
                if (extraPresentationManager.getActivePresentationControl().isFocusControl()) {
                    ISelectionProvider selectionProvider = extraPresentationManager.activePresentation.getSelectionProvider();
                    if (selectionProvider != null) {
                        return selectionProvider;
                    }
                }
            }
            ResultSetViewer rsv = getActiveResultSetViewer();
            TextViewer textViewer = getTextViewer();
            boolean focusInEditor = textViewer != null && textViewer.getTextWidget().isFocusControl();
            if (!focusInEditor) {
                if (rsv != null && rsv.getActivePresentation().getControl() != null && rsv.getActivePresentation().getControl().isFocusControl()) {
                    focusInEditor = false;
                } else {
                    focusInEditor = lastFocusInEditor;
                }
            }
            lastFocusInEditor = focusInEditor;
            if (!focusInEditor && rsv != null) {
                return rsv;
            } else if (textViewer != null) {
                return textViewer.getSelectionProvider();
            } 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