JAL-3551 save structure viewer session refactorings, PyMol added
[jalview.git] / src / jalview / gui / PymolBindingModel.java
index af4afb0..6787c8a 100644 (file)
@@ -1,5 +1,10 @@
 package jalview.gui;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import jalview.api.AlignmentViewPanel;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
@@ -11,11 +16,6 @@ import jalview.structure.StructureCommandI;
 import jalview.structure.StructureSelectionManager;
 import jalview.structures.models.AAStructureBindingModel;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 public class PymolBindingModel extends AAStructureBindingModel
 {
   private PymolManager pymolManager;
@@ -72,7 +72,7 @@ public class PymolBindingModel extends AAStructureBindingModel
   protected List<String> executeCommand(StructureCommandI command,
           boolean getReply)
   {
-    System.out.println(command.toString()); // debug
+    // System.out.println(command.toString()); // debug
     return pymolManager.sendCommand(command, getReply);
   }
 
@@ -100,11 +100,6 @@ public class PymolBindingModel extends AAStructureBindingModel
     {
       pymolManager.exitPymol();
     }
-    // if (this.pymolListener != null)
-    // {
-    // pymolListener.shutdown();
-    // pymolListener = null;
-    // }
     pymolManager = null;
 
     if (pymolMonitor != null)
@@ -173,4 +168,16 @@ public class PymolBindingModel extends AAStructureBindingModel
     return file;
   }
 
+  /**
+   * Returns the file extension to use for a saved viewer session file (.pse)
+   * 
+   * @return
+   * @see https://pymolwiki.org/index.php/Save
+   */
+  @Override
+  public String getSessionFileExtension()
+  {
+    return ".pse";
+  }
+
 }