private void setEditorMode(final FetchDataResult fetchDataResult) {
        final AceEditorMode mode;

        if (FetchDataRequest.DisplayMode.HEX.equals(fetchDataResult.getDisplayMode())) {
            mode = AceEditorMode.STROOM_HEX_DUMP;
        } else if (fetchDataResult.getSourceLocation() != null
                && StreamTypeNames.META.equals(fetchDataResult.getSourceLocation().getChildType())) {
            mode = AceEditorMode.PROPERTIES;
        } else { // We have no way of knowing what type the data is (could be csv, json, xml) so assume XML
            mode = AceEditorMode.XML;
        }
        textPresenter.setMode(mode);
    }
Compare the {@link DataRange}s using on the from/to {@link Location};
stroom-core-client/src/main/java/stroom/data/client/presenter/SourcePresenter.java