From 9de1722b93793d379233e4680afc2700c5659eea Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 27 Jul 2016 17:41:59 +0100 Subject: [PATCH] JAL-2154 toString for forward references --- src/jalview/gui/Jalview2XML.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 0f15505..3bf73df 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -278,9 +278,12 @@ public class Jalview2XML { String sref; - public SeqFref(String _sref) + String type; + + public SeqFref(String _sref, String type) { sref = _sref; + this.type = type; } public String getSref() @@ -314,6 +317,12 @@ public class Jalview2XML * @return true if the forward reference was fully resolved */ abstract boolean resolve(); + + @Override + public String toString() + { + return type + " reference to " + sref; + } } /** @@ -326,7 +335,7 @@ public class Jalview2XML public SeqFref newMappingRef(final String sref, final jalview.datamodel.Mapping _jmap) { - SeqFref fref = new SeqFref(sref) + SeqFref fref = new SeqFref(sref, "Mapping") { public jalview.datamodel.Mapping jmap = _jmap; @@ -349,7 +358,7 @@ public class Jalview2XML final AlignedCodonFrame _cf, final jalview.datamodel.Mapping _jmap) { - SeqFref fref = new SeqFref(sref) + SeqFref fref = new SeqFref(sref, "Codon Frame") { AlignedCodonFrame cf = _cf; -- 1.7.10.2