From 919d0621d92a3a8e8c0cae1077965b28c0ddf3e4 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 9 Jan 2015 08:31:08 +0000 Subject: [PATCH] JAL-1588 check Chimera session file still exists --- src/jalview/gui/Jalview2XML.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 9ba8fb7..563429f 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -3231,8 +3231,18 @@ public class Jalview2XML protected void createChimeraViewer(Entry viewerData, AlignFrame af) { - final ViewerData svattrib = viewerData.getValue(); - ChimeraViewFrame cvf = new ChimeraViewFrame(svattrib, af); + final ViewerData data = viewerData.getValue(); + String chimeraSession = data.stateData; + if (new File(chimeraSession).exists()) + { + // TODO can/should this be done via StructureViewer (like Jmol)? + ChimeraViewFrame cvf = new ChimeraViewFrame(data, af); + } + else + { + Cache.log.error("Chimera session file " + chimeraSession + + " not found"); + } } /** -- 1.7.10.2