protected void selectWord() {
        if (matchWord()) {
            if (startPos == endPos)
                fText.setSelectedRange(startPos, 0);
            else
                fText.setSelectedRange(startPos + 1, endPos - startPos - 1);
        }
    }
Selects the word at the current selection location.
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/syntax/SQLDoubleClickStrategy.java