genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

Reading of default values for Files #136

Closed jpfeuffer closed 8 years ago

jpfeuffer commented 8 years ago

I came across this while fixing tests that crashed after omitting unconnected/empty ports. It seems to me as if default values for File parameters in a CTD were not read. I see that it might not be necessary since they are overwritten during validation of the node with the actual connected URI(s). I don't know why this was done (no documentation) and it seems weird because from what I saw for FileLists, it is the case that defaults are read. I think it is not wrong to actually read the defaults and I can not imagine a case that makes the nodes break, since these defaults will be overwritten anyway, when the node is configured. I made a change that resets the value of the according Fileparameters to null, when the inputs are null, so unconnected ports are also handled correctly. IMHO this is a more intuitive behaviour and better makes sure that the connections in the GUI are reflected. But I am not sure, and I don't know if I missed a corner case. @chahuistle @aiche Can you quickly think about the effects this might have?

jpfeuffer commented 8 years ago

The longer I think about it, the better this change looks. Also fixes tests, that seem to hold back the plugin.