Hi,
The next release of Jalview will include the ability to save and restore any open Varna sessions.
I am trying to update Jalview from Varna 3.91 to 3.92 and noticed this problem:
When the session is written to XML, this includes the toString() version of the BP_STYLE enum value (toString() added in 3.92).
When it is read back, this fails to resolve using the getStyle() method.
As a result, VARNAConfig._mainBPStyle is null, and this causes a NullPointerException at the switch statement in VARNAPanel.drawBasePair().
I think the solution is just to change VARNAConfig.toXML()
from
atts.addAttribute("","",XML_VAR_MAIN_BP_STYLE,"CDATA", ""+_mainBPStyle);
to
atts.addAttribute("","",XML_VAR_MAIN_BP_STYLE,"CDATA", mainBPStyle.getOpt());
but I haven't tested this (or looked for any similar problems elsewhere).
One other observation on reloading from the saved session:
The <RNA mode=""> attribute is written, but not read on load.
As a result reloaded models all default to RADIATE.
Would it be possible to set this value when the XML is parsed please?
Thanks!
Mungo