IStructuredFormatProcessor formatProcessor = null;
if (map.containsKey(contentTypeId)) {
formatProcessor = (IStructuredFormatProcessor) map.get(contentTypeId);
} else {
IContentTypeManager manager = Platform.getContentTypeManager();
IContentType queryContentType = manager.getContentType(contentTypeId);
boolean found = false;
for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
String elementContentTypeId = (String) iter.next();
IContentType elementContentType = manager.getContentType(elementContentTypeId);
if (queryContentType.isKindOf(elementContentType)) {
formatProcessor = (IStructuredFormatProcessor) map.get(elementContentTypeId);
map.put(contentTypeId, formatProcessor);
found = true;
break;