for (int i = 0; i < extensions.length; i++) {
List<Vertex> readableFormats = new ArrayList<Vertex>();
List<Vertex> writeableFormats = new ArrayList<Vertex>();
IConversionExtension conversionExtension = null;
IExtension extension = extensions[i];
IConfigurationElement[] configurations = extension.getConfigurationElements();
for (int j = 0; j < configurations.length; j++) {
IConfigurationElement element = configurations[j];
String fileExtension = element.getAttribute("fileExtension");
String isLossless = element.getAttribute("isLossless");
if (isLossless == null) {
isLossless = Boolean.FALSE.toString();
}
if (fileExtension != null) {
Vertex fileFormat = new Vertex(fileExtension,
isLossless.equals(Boolean.TRUE.toString()));
if (element.getName().equals("writeableFormat")) {
writeableFormats.add(fileFormat);
}
else if (element.getName().equals("readableFormat")) {
readableFormats.add(fileFormat);
}
}
if (element.getName().equals("implementingClass")){
try {
conversionExtension = (IConversionExtension) element.createExecutableExtension("className");
} catch (CoreException e) {
// Extension could not be created
Logger.logError("Error instantiating extension " +extension.getUniqueIdentifier(), this.getClass());
break;
}
}
}