public void render(final IndicatorLines indicators, final boolean visible) {
        this.indicators = indicators;
        final StringBuilder sb = new StringBuilder();
        int width = 0;

        if (visible) {
            if (indicators != null) {
                final Severity maxSeverity = indicators.getMaxSeverity();
                if (maxSeverity != null) {
                    // Add the top summary marker.
                    sb.append("<div class=\"");
                    sb.append("codeEditor-summaryContainer");
                    sb.append("\">");

                    sb.append("<div class=\"");
                    sb.append("codeEditor-summary");
                    sb.append(" ");
                    switch (maxSeverity) {
                        case FATAL_ERROR:
                            sb.append("codeEditor-fatal");
                            break;
                        case ERROR:
                            sb.append("codeEditor-error");
                            break;
                        case WARNING:
                            sb.append("codeEditor-warning");
                            break;
                        default:
                            sb.append("codeEditor-info");
                            break;
                    }
                    sb.append("\">");
                    sb.append("</div>");

                    sb.append("</div>");
                }

                final int minMarkerBarTop = getMinMarkerBarTop();
                final int maxMarkerBarTop = getMaxMarkerBarTop();
                final double scrollBarTop = getScrollBarTop();
                final double scrollBarHeight = getScrollBarHeight();
                final int maxLineNo = editor.getLineCount();

                if (maxLineNo > 0 && scrollBarHeight > 0) {
                    final double increment = scrollBarHeight / maxLineNo;

                    int lastTop = -1;
                    Severity lastSeverity = null;

                    for (int lineNo : indicators.getLineNumbers()) {
                        if (lineNo <= maxLineNo) {
                            final Indicator indicator = indicators.getIndicator(lineNo);
                            final Severity severity = indicator.getMaxSeverity();

                            if (severity != null) {
                                // Get the top pixel position for the marker.
                                if (lineNo < 1) {
                                    lineNo = 1;
                                }

                                int top = (int) (increment * lineNo);
                                top += scrollBarTop;
                                if (top < minMarkerBarTop) {
                                    top = minMarkerBarTop;
                                } else if (top > maxMarkerBarTop) {
                                    top = maxMarkerBarTop;
                                }

                                // Don't add multiple markers at the same
                                // position unless we are adding an error on top
                                // of a warning.
                                if (lastTop != top || (lastSeverity != null && severity.greaterThan(lastSeverity))) {
                                    sb.append("<div lineno=\"");
                                    sb.append(lineNo);
                                    sb.append("\" class=\"");
                                    sb.append("codeEditor-marker");
                                    sb.append(" ");
                                    switch (severity) {
                                        case FATAL_ERROR:
                                            sb.append("codeEditor-fatal");
                                            break;
                                        case ERROR:
                                            sb.append("codeEditor-error");
                                            break;
                                        case WARNING:
                                            sb.append("codeEditor-warning");
                                            break;
                                        default:
                                            sb.append("codeEditor-info");
                                            break;
                                    }
                                    sb.append("\" style=\"top:");
                                    sb.append(top);
                                    sb.append("px;\">");
                                    sb.append("</div>");

                                    lastTop = top;
                                    lastSeverity = severity;
                                }
                            }
                        }
                    }
                }
            }

            width = OVERVIEW_WIDTH;
        }

        this.width = width;
        getElement().setInnerHTML(sb.toString());
    }
Redraws the overview bar. This is called when indicators are
added/removed, when indicators are set to be displayed and when the
widget is resized.
stroom-core-client-widget/src/main/java/stroom/editor/client/view/RightBar.java