}
FileType type = new FileType(name, ext );
extensionSet.add( type );
}
if ("provider".equals(element.getName())) {
FormatProvider provider = (FormatProvider) element
.createExecutableExtension("class");
String name = null;
if( name == null ){
name = provider.getClass().getSimpleName();
if( name.equals("FileDataStoreFormatProvider")){
name = "GeoTools DataStore Files";
}
else if( name.endsWith("FormatProvider")){
name = name.substring(0,name.length()-14); // trim FormatProvider
name += "Files"; // GDALFormatProvider --> GDAL Files
}
}
StringBuilder ext = new StringBuilder();
Set<String> providerExtensions = provider.getExtensions();
if( !providerExtensions.isEmpty() ){
for( String fileExtension : providerExtensions ){
if( ext.length() != 0 ){
ext.append(";");
}