/** @since 3.0 * */
private void write(IMarkupWriter writer, LocalizationToken token)
{
IComponent component = getInspectedComponent();
writer.begin("span");
writer.attribute("class", "jwc-tag");
writer.print("<span key=\"");
writer.print(token.getKey());
writer.print('"');
Map attributes = token.getAttributes();
if (attributes != null && !attributes.isEmpty())
{
Iterator it = attributes.entrySet().iterator();
while (it.hasNext())
{
Map.Entry entry = (Map.Entry) it.next();
String attributeName = (String) entry.getKey();
String attributeValue = (String) entry.getValue();
writer.print(' ');
writer.print(attributeName);
writer.print("=\"");
writer.print(attributeValue);
writer.print('"');
}
}
writer.print('>');
writer.begin("span");
writer.attribute("class", "localized-string");
writer.print(component.getMessages().getMessage(token.getKey()));
writer.end(); // <span>
writer.print("</span>");
writer.end(); // <span>