replacing @j2sNative with @j2sIgnore where appropriate - requires NEW
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Wed, 3 Apr 2019 23:52:20 +0000 (18:52 -0500)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Wed, 3 Apr 2019 23:52:20 +0000 (18:52 -0500)
TRANSPILER

24 files changed:
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java
src/jalview/ext/ensembl/EnsemblRestClient.java
src/jalview/fts/service/pdb/PDBFTSRestClient.java
src/jalview/fts/service/uniprot/UniProtFTSRestClient.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AnnotationColumnChooser.java
src/jalview/gui/Desktop.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/Help.java
src/jalview/gui/IdPanel.java
src/jalview/gui/JvOptionPane.java
src/jalview/gui/PopupMenu.java
src/jalview/gui/Preferences.java
src/jalview/gui/SplashScreen.java
src/jalview/gui/UserDefinedColours.java
src/jalview/io/JalviewFileChooser.java
src/jalview/renderer/AnnotationRenderer.java
src/jalview/util/BrowserLauncher.java
src/jalview/util/Platform.java
swingjs/net.sf.j2s.core.jar
swingjs/timestamp
swingjs/ver/3.2.4/net.sf.j2s.core.jar
swingjs/ver/3.2.4/timestamp

index 9dcc949..b6ff253 100755 (executable)
@@ -1088,18 +1088,4 @@ public class Cache
     }
   }
 
-       /**
-        * Add a known domain that implements access-control-allow-origin:* bh 2018
-        * 
-        * @param defaultUniprotDomain
-        */
-       public static void addJ2SDirectDatabaseCall(String domain) 
-       {
-
-               /**
-                * @j2sNative
-                * 
-                *                      J2S.addDirectDatabaseCall(domain);
-                */
-       }
 }
index 330919b..226888f 100755 (executable)
@@ -127,7 +127,7 @@ public class Jalview
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       // grab all the rights we can for the JVM
@@ -239,12 +239,21 @@ public class Jalview
   @SuppressWarnings("unused")
   private static void setLogging() 
   {
+
+    /**
+     * @j2sIgnore
+     * 
+     */
+    {
+      System.out.println("not in js");
+    }
+
          // BH - for event debugging in JavaScript (Java mode only)
     if (!Platform.isJS())
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
        {
                Logger.getLogger("").setLevel(Level.ALL);
@@ -292,7 +301,7 @@ public class Jalview
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       if (aparser.contains("help") || aparser.contains("h"))
@@ -435,7 +444,7 @@ public class Jalview
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         desktop.startServiceDiscovery();
@@ -609,7 +618,7 @@ public class Jalview
         /**
          * ignore in JavaScript -- can't just file existence - could load it?
          * 
-         * @j2sNative
+         * @j2sIgnore
          */
       {
         if (!file.startsWith("http://") && !file.startsWith("https://"))
@@ -844,7 +853,7 @@ public class Jalview
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       file = jalview.bin.Cache.getDefault("STARTUP_FILE",
index 9a647f4..b605232 100644 (file)
@@ -20,7 +20,6 @@
  */
 package jalview.ext.ensembl;
 
-import jalview.bin.Cache;
 import jalview.util.Platform;
 import jalview.util.StringUtils;
 
@@ -50,8 +49,8 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher
 
   static
   {
-    Cache.addJ2SDirectDatabaseCall("http://rest.ensembl");
-    Cache.addJ2SDirectDatabaseCall("https://rest.ensembl");
+    Platform.addJ2SDirectDatabaseCall("http://rest.ensembl");
+    Platform.addJ2SDirectDatabaseCall("https://rest.ensembl");
   }
 
   private static final int DEFAULT_READ_TIMEOUT = 5 * 60 * 1000; // 5 minutes
index 8a10c66..0b5d431 100644 (file)
@@ -135,7 +135,7 @@ public class PDBFTSRestClient extends FTSRestClient
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         client = Client.create(new DefaultClientConfig());
index 1f4d56a..ae8f6e5 100644 (file)
@@ -48,7 +48,7 @@ public class UniProtFTSRestClient extends FTSRestClient
   private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org";
 
   static {
-         Cache.addJ2SDirectDatabaseCall(DEFAULT_UNIPROT_DOMAIN);
+    Platform.addJ2SDirectDatabaseCall(DEFAULT_UNIPROT_DOMAIN);
   }
   
   private static FTSRestClientI instance = null;
@@ -62,6 +62,7 @@ public class UniProtFTSRestClient extends FTSRestClient
             DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";    
   }
 
+  @SuppressWarnings("unchecked")
   @Override
   public FTSRestResponse executeRequest(FTSRestRequest uniprotRestRequest)
           throws Exception
@@ -106,7 +107,7 @@ public class UniProtFTSRestClient extends FTSRestClient
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         // Java only
@@ -213,38 +214,39 @@ public class UniProtFTSRestClient extends FTSRestClient
     return searchResult;
   }
 
-  /**
-   * Takes a collection of FTSDataColumnI and converts its 'code' values into a
-   * tab delimited string.
-   * 
-   * @param dataColumnFields
-   *          the collection of FTSDataColumnI to process
-   * @return the generated comma delimited string from the supplied
-   *         FTSDataColumnI collection
-   */
-  private String getDataColumnsFieldsAsTabDelimitedString(
-          Collection<FTSDataColumnI> dataColumnFields)
-  {
-    String result = "";
-    if (dataColumnFields != null && !dataColumnFields.isEmpty())
-    {
-      StringBuilder returnedFields = new StringBuilder();
-      for (FTSDataColumnI field : dataColumnFields)
-      {
-        if (field.getName().equalsIgnoreCase("Uniprot Id"))
-        {
-          returnedFields.append("\t").append("Entry");
-        }
-        else
-        {
-          returnedFields.append("\t").append(field.getName());
-        }
-      }
-      returnedFields.deleteCharAt(0);
-      result = returnedFields.toString();
-    }
-    return result;
-  }
+  // /**
+  // * Takes a collection of FTSDataColumnI and converts its 'code' values into
+  // a
+  // * tab delimited string.
+  // *
+  // * @param dataColumnFields
+  // * the collection of FTSDataColumnI to process
+  // * @return the generated comma delimited string from the supplied
+  // * FTSDataColumnI collection
+  // */
+  // private String getDataColumnsFieldsAsTabDelimitedString(
+  // Collection<FTSDataColumnI> dataColumnFields)
+  // {
+  // String result = "";
+  // if (dataColumnFields != null && !dataColumnFields.isEmpty())
+  // {
+  // StringBuilder returnedFields = new StringBuilder();
+  // for (FTSDataColumnI field : dataColumnFields)
+  // {
+  // if (field.getName().equalsIgnoreCase("Uniprot Id"))
+  // {
+  // returnedFields.append("\t").append("Entry");
+  // }
+  // else
+  // {
+  // returnedFields.append("\t").append(field.getName());
+  // }
+  // }
+  // returnedFields.deleteCharAt(0);
+  // result = returnedFields.toString();
+  // }
+  // return result;
+  // }
 
   public static FTSData getFTSData(String tabDelimittedDataStr,
           FTSRestRequest request)
index 270023e..b655b2e 100644 (file)
@@ -3325,7 +3325,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       JEditorPane editPane = new JEditorPane("text/html", "");
index d841177..8046902 100644 (file)
@@ -88,8 +88,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
 
   private HiddenColumns oldHiddenColumns;
 
+  // J2SHIDDENCODE
   protected static int MIN_WIDTH = (/** @j2sNative 370||*/420);
 
+  // J2SHIDDENCODE
   protected static int MIN_HEIGHT = (/** @j2sNative 370||*/430);
 
   public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
index b7e1117..14beac2 100644 (file)
@@ -410,7 +410,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
 
@@ -1192,7 +1192,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       JComboBox<String> asCombo = new JComboBox<>();
@@ -1455,7 +1455,7 @@ public class Desktop extends jalview.jbgui.GDesktop
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         Help.showHelpWindow();
index 0cd8620..872fe15 100644 (file)
@@ -1716,7 +1716,7 @@ class ColorEditor extends AbstractCellEditor
           /**
            * Java only
            * 
-           * @j2sNative
+           * @j2sIgnore
            */
           {
             chooser.setRequestFocusEnabled(true);
index 48f84c3..8bd01ea 100644 (file)
@@ -105,7 +105,7 @@ public class Help
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
 
index 8f97f9a..6b312ad 100755 (executable)
@@ -353,7 +353,7 @@ public class IdPanel extends JPanel
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       scrollThread.start();
index 0e3d5ef..bf15b86 100644 (file)
@@ -793,7 +793,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI,
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       handleResponse(response);
@@ -827,7 +827,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI,
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       handleResponse(response);
index 3a6f9e4..ad33110 100644 (file)
@@ -811,7 +811,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
@@ -1736,7 +1736,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
index f961712..9d5596e 100755 (executable)
@@ -193,7 +193,7 @@ public class Preferences extends GPreferences
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       wsPrefs = new WsPreferences();
@@ -1077,7 +1077,7 @@ public class Preferences extends GPreferences
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       JFileChooser chooser = new JFileChooser(".");
index f7d7cbf..2b87e10 100755 (executable)
@@ -97,7 +97,7 @@ public class SplashScreen extends JPanel
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         authlist = new JTextPane();
@@ -180,7 +180,7 @@ public class SplashScreen extends JPanel
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       ((JTextPane) authlist).setEditable(false);
@@ -221,7 +221,7 @@ public class SplashScreen extends JPanel
       /**
        * Java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         authlist = new JTextPane();
index 621f49d..4846049 100755 (executable)
@@ -490,7 +490,7 @@ public class UserDefinedColours extends GUserDefinedColours
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       String name = schemeName.getText().trim();
@@ -753,7 +753,7 @@ public class UserDefinedColours extends GUserDefinedColours
       /**
        * java only
        * 
-       * @j2sNative
+       * @j2sIgnore
        */
       {
         int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
index acd0e18..88a20e7 100755 (executable)
@@ -224,7 +224,7 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI,
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
       /*
index 1cd3d3b..548291c 100644 (file)
@@ -1505,7 +1505,7 @@ public class AnnotationRenderer
             /**
              * Java only
              * 
-             * @j2sNative
+             * @j2sIgnore
              */
             {
               // Java ('normal') method is to scale the font to fit
index 45b7551..8119daa 100755 (executable)
@@ -240,7 +240,7 @@ public class BrowserLauncher
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      * 
      */
     {
@@ -340,7 +340,7 @@ public class BrowserLauncher
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      * 
      */
     {
@@ -547,7 +547,7 @@ public class BrowserLauncher
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      * 
      */
     {
@@ -752,7 +752,7 @@ public class BrowserLauncher
     /**
      * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      */
     {
 
index 68985b5..c0c8966 100644 (file)
@@ -521,10 +521,10 @@ public class Platform
   public static void streamToFile(InputStream is, File outFile)
           throws IOException
   {
-    if (!isJS() || /**
-                    * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) ||
-                    */
-            false)
+    if (isJS() && /**
+                   * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) &&
+                   */
+            true)
     {
       return;
     }
@@ -543,4 +543,29 @@ public class Platform
     }
   }
 
+  /**
+   * Add a known domain that implements access-control-allow-origin:*
+   * 
+   * These should be reviewed periodically.
+   * 
+   * @param domain
+   *          for a service that is not allowing ajax
+   * 
+   * @author hansonr@stolaf.edu
+   * 
+   */
+  public static void addJ2SDirectDatabaseCall(String domain)
+  {
+
+    System.out.println(
+            "Platform adding no-access-control-allow-origin domain "
+                    + domain);
+
+    /**
+     * @j2sNative
+     * 
+     *            J2S.addDirectDatabaseCall(domain);
+     */
+  }
+
 }
index 5bb94fa..30f7d1f 100644 (file)
Binary files a/swingjs/net.sf.j2s.core.jar and b/swingjs/net.sf.j2s.core.jar differ
index 57e631c..6860e8b 100644 (file)
@@ -1 +1 @@
-20190403083450 
+20190403175448 
index 5bb94fa..30f7d1f 100644 (file)
Binary files a/swingjs/ver/3.2.4/net.sf.j2s.core.jar and b/swingjs/ver/3.2.4/net.sf.j2s.core.jar differ
index 57e631c..6860e8b 100644 (file)
@@ -1 +1 @@
-20190403083450 
+20190403175448