JAL-629 Change all stdout and stderr output to use Console.outPrintln and Console...
[jalview.git] / src / jalview / javascript / JsSelectionSender.java
index b025460..eda8741 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -23,11 +23,12 @@ package jalview.javascript;
 import jalview.appletgui.AlignFrame;
 import jalview.bin.JalviewLite;
 import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SequenceGroup;
 import jalview.structure.SelectionSource;
 
-public class JsSelectionSender extends JSFunctionExec implements
-        jalview.structure.SelectionListener, JsCallBack
+public class JsSelectionSender extends JSFunctionExec
+        implements jalview.structure.SelectionListener, JsCallBack
 {
 
   AlignFrame _af;
@@ -44,9 +45,10 @@ public class JsSelectionSender extends JSFunctionExec implements
 
   @Override
   public void selection(SequenceGroup seqsel, ColumnSelection colsel,
-          SelectionSource source)
+          HiddenColumns hidden, SelectionSource source)
   {
-    // System.err.println("Testing selection event relay to jsfunction:"+_listener);
+    // jalview.bin.Console.errPrintln("Testing selection event relay to
+    // jsfunction:"+_listener);
     try
     {
       String setid = "";
@@ -63,8 +65,8 @@ public class JsSelectionSender extends JSFunctionExec implements
       }
       String[] seqs = new String[] {};
       String[] cols = new String[] {};
-      int strt = 0, end = (src == null) ? -1 : src.alignPanel.av
-              .getAlignment().getWidth();
+      int strt = 0, end = (src == null) ? -1
+              : src.alignPanel.av.getAlignment().getWidth();
       if (seqsel != null && seqsel.getSize() > 0)
       {
         seqs = new String[seqsel.getSize()];
@@ -104,19 +106,20 @@ public class JsSelectionSender extends JSFunctionExec implements
         ;
 
       }
-      System.err.println("Relaying selection to jsfunction:" + _listener);
+      jalview.bin.Console.errPrintln("Relaying selection to jsfunction:" + _listener);
       executeJavascriptFunction(_listener,
-              new Object[] { src, setid, jvlite.arrayToSeparatorList(seqs),
+              new Object[]
+              { src, setid, jvlite.arrayToSeparatorList(seqs),
                   jvlite.arrayToSeparatorList(cols) });
     } catch (Exception ex)
     {
-      System.err
-              .println("Jalview Javascript exec error: Couldn't send selection message using function '"
+      jalview.bin.Console.errPrintln(
+              "Jalview Javascript exec error: Couldn't send selection message using function '"
                       + _listener + "'");
       ex.printStackTrace();
       if (ex instanceof netscape.javascript.JSException)
       {
-        System.err.println("Javascript Exception: "
+        jalview.bin.Console.errPrintln("Javascript Exception: "
                 + ((netscape.javascript.JSException) ex).getCause()
                         .toString());
       }