void select(long start, long end)
    {
        upANibble = 0;
        //boolean selection = startPosition != endPosition;
        startPosition = 0L;
        if (start > 0L) {
            startPosition = start;
            if (startPosition > content.length()) startPosition = content.length();
        }

        endPosition = startPosition;
        if (end > startPosition) {
            endPosition = end;
            if (endPosition > content.length()) endPosition = content.length();
        }

        notifyLongSelectionListeners();
    }
Sets the selection from start to end.
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java