Unidata / IDV

The Integrated Data Viewer (IDV) from Unidata is a framework for analyzing and displaying geoscience data.
http://www.unidata.ucar.edu/software/idv/
Other
80 stars 37 forks source link

Allow specifying default server for ADDE choosers. #144

Closed jon4than closed 4 years ago

jon4than commented 4 years ago

This commit allows idv.properties to specify the default ADDEserver/group selection for ADDE choosers.

Using the GLM chooser as an example, you can have adde.ucar.edu be the default even if your ADDE server lists are sorted alphabetically:

idv.defaultselection.chooser.glm.server=adde.ucar.edu
idv.defaultselection.chooser.glm.group=RTGOESR
donmurray commented 4 years ago

I would suggest keeping the name more in line with the others that are already being used. For the adde stuff, we have:

idv.data.adde.servers.XXXXX

and

idv.chooser.XXXXX

So, I'd suggest:

idv.chooser.glm.default.server idv.chooser.glm.default.group

or

idv.data.adde.servers.glm.defaultserver idv.data.adde.servers.glm.defaultgroup

or something similar to be consistent.

yuanho commented 4 years ago

my suggestion:

idv.data.adde.glm.defaultserver=adde.ucar.edu idv.data.adde.glm.defaultgroup= RTGOESR

donmurray commented 4 years ago

Yes, that's better. I shouldn't have had "servers" in my suggestion.

jon4than commented 4 years ago

One limitation is that I'm building the property names using the results returned by IdvChooser#getId(). getId is simply returning the value of a given chooser's id attribute as specified in ucar/unidata/idv/resources/choosers.xml.

Using Yuan's example, the properties would become:

idv.data.adde.chooser.glm.defaultserver=adde.ucar.edu
idv.data.adde.chooser.glm.defaultgroup= RTGOESR

I do like that it makes it obvious that the properties apply to a chooser rather than something like a data source, but I'm not opposed to modifying the getDefaultServerSelection method that I added to simply strip chooser. out of the ID string.

Just felt that stuff was worth stating explicitly.

Additionally, @rmcarp noticed that this change doesn't actually affect the behavior of the point choosers :grimacing:, so I'll be adding a fix to this pull request shortly.