@Override
        public IFindReplaceTarget getTarget() {
            //getTarget determines current composite used for find/replace
            //We should update it, when we focus on the other panels or output view
            ResultSetViewer rsv = getActiveResultSetViewer();
            TextViewer textViewer = getTextViewer();
            final SQLEditorOutputConsoleViewer outputViewer = SQLEditor.this.outputViewer.getViewer();
            boolean focusInEditor = textViewer != null && textViewer.getTextWidget() != null && textViewer.getTextWidget().isFocusControl();
            if (!focusInEditor) {
                if (rsv == null && !outputViewer.getText().isFocusControl() && previousTarget != null) {
                    focusInEditor = textViewer != null && previousTarget.equals(textViewer.getFindReplaceTarget());
                }
            }
            if (!focusInEditor) {
                //Focus is on presentation we need to find a class for it
                if (rsv != null && rsv.getActivePresentation().getControl().isFocusControl()) {
                    previousTarget = rsv.getAdapter(IFindReplaceTarget.class);
                } else if (outputViewer.getControl().isFocusControl()) {
                    //Output viewer is just StyledText we use StyledTextFindReplace
                    previousTarget = new StyledTextFindReplaceTarget(outputViewer.getText());
                }
            } else {
                previousTarget = textViewer.getFindReplaceTarget();
            }
            return previousTarget;
        }
Build and update icon and title
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java