Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] fileFormat extension point

I will say "yes" - but we may need to think through what you would expect.

But we may need to figure out how ... the SWT File open dialog is really focused on using a set of strings which it uses to filter the files. Indeed each platform has a very different file open dialog - on windows it only shows my files that match one of the available extensions; on mac it shows me all the files ... but the ones that do not match are greyed out.

So if we can review what SWT (or JFace) offers and sort out a way to recognise folders we can add to the fileFormat extension point.

Jody

On 09/04/2010, at 9:22 PM, andrea antonello wrote:

> That sounds cool.
> Would that also allow data formats based on something different than a
> extention?
> For example the GRASS raster format is based on a file structure in
> folders, not an extention. If I could be able to provide a class that
> does the check, I would be fine. Instead I have to create a dummy file
> in the folder.
> 
> Andrea
> 
> On Fri, Apr 9, 2010 at 6:53 AM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
>> Today I am kicking the tires of the fileFormat extension point -- which is
>> used like so:
>> 
>>     <extension
>>           id="net.refractions.udig.catalog.shp.fileFormat"
>>           point="net.refractions.udig.catalog.ui.fileFormat">
>>        <fileService
>>              fileExtension="*.shp"
>>              name="%fileService.name"/>
>>     </extension>
>> 
>> Mostly I am filling in the description information so it is easier to fill
>> in for 1st time users (cause I never remember that * is needed).
>> I am also looking at this with an eye for the generic datastore supported; I
>> need to programatically come up with a list of supported file extensions -
>> and doing the same thing for the imageio-ext formats would also be smart.
>> So I am thinking of allowing ...
>> 
>>     <extension
>>           id="net.refractions.udig.catalog.shp.fileFormat"
>>           point="net.refractions.udig.catalog.ui.fileFormat">
>>        <fileService
>>              fileExtension="*.shp"
>>              name="%fileService.name"/> <!-- explicit is still allowed -->
>> 
>>        <dynamic
>> 
>> provider="net.refractions.udig.catalog.geotools.data.DataStoreFormatProvider" />
>>     </extension>
>> 
>> 
>> The "FormatProvider" interface would need to produce a Map<String,String>
>> documenting extension and format name.
>> Jody
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>> 
>> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top