public String getText(Object o) {
String label = "";
if (o instanceof EncodingCollection) {
label = EditorMessages.getString("Encoding." + encodingType + ".allEncodings");
} else {
Encoding encoding = (Encoding) o;
String encodingName = encoding.getName().replaceAll(" ", "");
String encodingType = EditorMessages.getString(
"Encoding." +
StringUtils.toLowerIgnoreLocale(encodingName) +
".label");
StringBuffer encodingContents = new StringBuffer();
Iterator it = encoding.extensions();
while (it.hasNext()) {
encodingContents.append("*.");
encodingContents.append(it.next());
if (it.hasNext()) {
encodingContents.append(extensionSeparator);