@Override
        public void mouseDown(MouseEvent e)
        {
            if (e.button == 1)
                dragging = true;
            int textOffset;
            try {
                textOffset = ((StyledText) e.widget).getOffsetAtLocation(new Point(e.x, e.y));
            } catch (IllegalArgumentException ex) {
                textOffset = ((StyledText) e.widget).getCharCount();
            }
            int byteOffset = textOffset / charLen;
            ((StyledText) e.widget).setTopIndex(0);
            if (e.button == 1 && (e.stateMask & SWT.MODIFIER_MASK & ~SWT.SHIFT) == 0) {// no modif or shift
                if ((e.stateMask & SWT.MODIFIER_MASK) == 0) {
                    caretStickToStart = false;
                    startPosition = endPosition = textAreasStart + byteOffset;
                } else {  // shift
                    shiftStartAndEnd(textAreasStart + byteOffset);
                }
                refreshCaretsPosition();
                setFocus();
                refreshSelections();
                //notifyListeners(SWT.Modify, null);
                notifyLongSelectionListeners();
            }
        }
Converts a hex String to byte[]. Will convert full bytes only, odd number of hex characters will
have a leading '0' added. Big endian.

@param hexString an hex string (ie. "0fdA1").
@return the byte[] value of the hex string
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java