Setting persistence for parameters of GenericDialog in Jython

parameters
jython
scripting
scijava
Tags: #<Tag:0x00007fb87e133fb0> #<Tag:0x00007fb87e133df8> #<Tag:0x00007fb87e133c40> #<Tag:0x00007fb87e133970>

#1

The scripting parameters with @ notation have this nice feature of using persistence between runs of the same script.
However for some applications, I have to use the Generic Dialog or Generic Dialog Plus classes instead of those @Parameters.
Unfortunately they do not offer such persistence by default. I found out that it should be possible to implement it in Jython using the PrefService interface of SciJava.
If someone would be able to provide an example that would be great !