From a4f0dde265e92e2639af7d953859f7d033e72c5a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 9 Nov 2016 16:57:46 +0000 Subject: [PATCH] JAL-2295 single constant for "RESNUM" feature name --- src/MCview/PDBChain.java | 4 +++- src/jalview/io/PDBFeatureSettings.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 34f09c8..6bc79dc 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -39,6 +39,8 @@ import java.util.Vector; public class PDBChain { + public static final String RESNUM_FEATURE = "RESNUM"; + /** * SequenceFeature group for PDB File features added to sequences */ @@ -367,7 +369,7 @@ public class PDBChain Residue tmpres = residues.lastElement(); Atom tmpat = tmpres.atoms.get(0); // Make A new SequenceFeature for the current residue numbering - SequenceFeature sf = new SequenceFeature("RESNUM", tmpat.resName + SequenceFeature sf = new SequenceFeature(RESNUM_FEATURE, tmpat.resName + ":" + tmpat.resNumIns + " " + pdbid + id, "", offset + count, offset + count, pdbid); resFeatures.addElement(sf); diff --git a/src/jalview/io/PDBFeatureSettings.java b/src/jalview/io/PDBFeatureSettings.java index 746c4a7..0f2b0ac 100644 --- a/src/jalview/io/PDBFeatureSettings.java +++ b/src/jalview/io/PDBFeatureSettings.java @@ -26,12 +26,14 @@ import jalview.schemes.FeatureSettingsAdapter; import java.awt.Color; +import MCview.PDBChain; + public class PDBFeatureSettings extends FeatureSettingsAdapter { // TODO find one central place to define feature names private static final String FEATURE_INSERTION = "INSERTION"; - private static final String FEATURE_RES_NUM = "RESNUM"; + private static final String FEATURE_RES_NUM = PDBChain.RESNUM_FEATURE; @Override public boolean isFeatureDisplayed(String type) -- 1.7.10.2