@Override
    public void read(final ComponentConfig componentConfig) {
        super.read(componentConfig);

        final TextComponentSettings.Builder builder;
        final ComponentSettings settings = componentConfig.getSettings();

        if (settings instanceof final TextComponentSettings textComponentSettings) {
            builder = textComponentSettings.copy();

            final Version version = Version.parse(textComponentSettings.getModelVersion());
            final boolean old = version.lt(CURRENT_MODEL_VERSION);

            // special field names have changed from EventId to __event_id__ so we need to deal
            // with those and replace them, also rebuild existing special fields just in case
            if (textComponentSettings.getStreamIdColumn() == null
                || (old && OLD_STREAM_ID.equals(textComponentSettings.getStreamIdColumn().getName()))) {
                builder.streamIdField(DEFAULT_STREAM_ID_COLUMN);
            }
            if (textComponentSettings.getRecordNoColumn() == null
                || (old && OLD_EVENT_ID.equals(textComponentSettings.getRecordNoColumn().getName()))) {
                builder.recordNoField(DEFAULT_EVENT_ID_COLUMN);
            }

        } else {
            builder = TextComponentSettings.builder();
            builder.streamIdField(DEFAULT_STREAM_ID_COLUMN);
            builder.recordNoField(DEFAULT_EVENT_ID_COLUMN);
        }

        builder.modelVersion(CURRENT_MODEL_VERSION.toString());
        setSettings(builder.build());
    }
The ranges returned are line/col positions in the input text. Thus the input text should
not be changed/formatted after the highlight ranges have been generated.
stroom-core-client/src/main/java/stroom/dashboard/client/text/TextPresenter.java