StringBuilder out = new StringBuilder();
out.append("StyleRange[] expected = new " + StyleRangeArrayBuilder.class.getSimpleName()) //$NON-NLS-1$
.append("()\n"); //$NON-NLS-1$
for (StyleRange styleRange : actual) {
PreferenceKey key = reverse.get(styleRange.foreground);
String method = proposeBuilderMethod(key);
String comment = proposeComment(styleRange, document);
out.append("."+ method +"("+ styleRange.length +") "+ comment +"\n"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
}
out.append(".build();\n"); //$NON-NLS-1$