[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] File format names for unbuntu 10.4 LTS FileDialog
|
Okay Andrea:
Internal to catalog.ui plugin FileConnectionFactory class I am adding a List<FileType> getTypeList( includeAll ) method to FileConnectionFactory, where FileType is:
public static class FileType implements Comparable<FileType> {
public final String name;
public final List<String> extensions;
}
In order to generate this information I am doing two things:
a) Making use of our fileFormat extension point - example:
<extension
id="net.refractions.udig.catalog.geotiff.fileFormats"
name="GeoTiff File Formats"
point="net.refractions.udig.catalog.ui.fileFormat">
<fileService
fileExtension="*.tif"
name="Tif"/>
<fileService
fileExtension="*.tiff"
name="Tiff"/>
</extension>
I will combine this into a single entry as follows:
<extension
id="net.refractions.udig.catalog.geotiff.fileFormats"
name="GeoTiff File Formats"
point="net.refractions.udig.catalog.ui.fileFormat">
<fileService
fileExtension="*.tif;*.tiff"
name="GeoTIFF"/>
</extension>
That also won't break backwards compatibility :-)
b) We also added a dynamic class for things like GDAL and JGrass to insert formats that they determine at runtime:
public interface FormatProvider {
/**
* Generated supported format extensions.
* <p>
* Extensions used directly and should be provided in the format "*.xxx".
*
* @return Set of format extensions
*/
Set<String> getExtensions();
}
- Short term; I am taking the Classname as the description to show the the user (perhaps knocking off the trailing word "provider"). So "GDALFormatProvider" is shown as "GDAL".
- Long term we need an API change, and you have at least one implementation right?
public interface FormatProvider {
List<String> getNames(); // example: "GeoTiff"
List<String> getExtensions(); // example: "*.tif;*.tiff"
}
On Wednesday, 22 August 2012 at 5:53 PM, Jody Garnett wrote:
The unbuntu 12.04 LTS experience way different; in particular the file dialog is poor.
Got this one on the run .. apparently dialog.setFilterNames( … ) will fix it for us; and that is so obvious nobody else on the internet made the same mistake.
Jody