private DataRange buildNewSourceLocationFromHighlightForHexDump(final SourceLocation sourceLocation,
                                                                    final DataRange highlight,
                                                                    final SourceConfig sourceConfig) {
        // Don't have to worry about highlights during stepping as hex is not available
        long newByteOffsetFrom = highlight.getOptByteOffsetFrom().map(
                        byteOffsetFrom -> Math.max(
                                0,
                                byteOffsetFrom -
                                        (HIGHLIGHT_CONTEXT_LINES_BEFORE * HexDump.MAX_BYTES_PER_LINE)))
                .orElse(0L);

//        GWT.log("old hl byteOffset: " + highlight.getOptByteOffsetFrom().get()
//                + " newByteOffset: " + newByteOffsetFrom);

        return DataRange.fromByteOffset(newByteOffsetFrom);
    }
Will attempt to set the source range using the passed highlight, i.e. if the highlight
is towards the end of the data then it will set the range to enclose the highlight.
stroom-core-client/src/main/java/stroom/data/client/presenter/SourcePresenter.java