JAL-3518 pull up [get|list]ResidueAttributes to StructureCommandsI
[jalview.git] / src / jalview / ext / rbvi / chimera / ChimeraXCommands.java
index f1a8b5f..314e6db 100644 (file)
@@ -35,17 +35,25 @@ import jalview.util.ColorUtils;
  */
 public class ChimeraXCommands extends ChimeraCommands
 {
+  // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#resattr
+  private static final StructureCommand LIST_RESIDUE_ATTRIBUTES = new StructureCommand("info resattr");
+
+  // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/exit.html
   private static final StructureCommand CLOSE_CHIMERAX = new StructureCommand("exit");
 
+  // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#notify
   private static final StructureCommand STOP_NOTIFY_SELECTION = new StructureCommand("info notify stop selection jalview");
 
   private static final StructureCommand STOP_NOTIFY_MODELS = new StructureCommand("info notify stop models jalview");
 
-  private static final StructureCommand GET_SELECTION = new StructureCommand("info selection level residue");
+  // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#selection
+  private static final StructureCommand GET_SELECTION = new StructureCommand(
+          "info selection level residue");
 
   private static final StructureCommand SHOW_BACKBONE = new StructureCommand(
           "~display all;~ribbon;show @CA|P atoms");
 
+  // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/view.html
   private static final StructureCommand FOCUS_VIEW = new StructureCommand(
           "view");
 
@@ -76,7 +84,6 @@ public class ChimeraXCommands extends ChimeraCommands
   @Override
   public StructureCommandI focusView()
   {
-    // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/view.html
     return FOCUS_VIEW;
   }
 
@@ -236,14 +243,12 @@ public class ChimeraXCommands extends ChimeraCommands
   @Override
   public StructureCommandI closeViewer()
   {
-    // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/exit.html
     return CLOSE_CHIMERAX;
   }
 
   @Override
   public List<StructureCommandI> startNotifications(String uri)
   {
-    // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#notify
     List<StructureCommandI> cmds = new ArrayList<>();
     cmds.add(new StructureCommand("info notify start models prefix ModelChanged jalview url " + uri));
     cmds.add(new StructureCommand("info notify start selection jalview prefix SelectionChanged url " + uri));
@@ -253,7 +258,6 @@ public class ChimeraXCommands extends ChimeraCommands
   @Override
   public List<StructureCommandI> stopNotifications()
   {
-    // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#notify
     List<StructureCommandI> cmds = new ArrayList<>();
     cmds.add(STOP_NOTIFY_MODELS);
     cmds.add(STOP_NOTIFY_SELECTION);
@@ -265,4 +269,10 @@ public class ChimeraXCommands extends ChimeraCommands
   {
     return GET_SELECTION;
   }
+
+  @Override
+  public StructureCommandI listResidueAttributes()
+  {
+    return LIST_RESIDUE_ATTRIBUTES;
+  }
 }