JAL-2295 single constant for "RESNUM" feature name
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 9 Nov 2016 16:57:46 +0000 (16:57 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 9 Nov 2016 16:57:46 +0000 (16:57 +0000)
src/MCview/PDBChain.java
src/jalview/io/PDBFeatureSettings.java

index 34f09c8..6bc79dc 100755 (executable)
@@ -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);
index 746c4a7..0f2b0ac 100644 (file)
@@ -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)