private void updateEditor() {
        if (lastResult.hasErrors()) {
            showErrors(lastResult);
        } else {
            textPresenter.setText(lastResult.getData());
            final int firstLineNo = receivedSourceLocation.getOptDataRange()
                    .flatMap(DataRange::getOptLocationFrom)
                    .map(Location::getLineNo)
                    .orElse(1);

            textPresenter.setFirstLineNumber(firstLineNo);
            setEditorMode(lastResult);
            updateEditorHighlights(lastResult.getSourceLocation().getHighlights());
        }
    }
Compare the {@link DataRange}s using on the from/to {@link Location};
stroom-core-client/src/main/java/stroom/data/client/presenter/SourcePresenter.java