JAL-3253 preliminary static fixes for JavaScript part 2
[jalview.git] / src / jalview / gui / Desktop.java
index d2967d7..bdb6de9 100644 (file)
@@ -215,7 +215,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     @SuppressWarnings("unused")
     ThreadGroup g = Thread.currentThread().getThreadGroup();
     /**
-     * @j2s g._jalviewDesktopInstance = d;
+     * @j2sNative g._jalviewDesktopInstance = d;
      */
     {
       instance = d;
@@ -240,13 +240,13 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   static final int yOffset = 30;
 
-  public static jalview.ws.jws1.Discoverer discoverer;
+  public jalview.ws.jws1.Discoverer discoverer;
 
-  public static Object[] jalviewClipboard;
+  public Object[] jalviewClipboard;
 
-  public static boolean internalCopy = false;
+  public boolean internalCopy = false;
 
-  static int fileLoadingCount = 0;
+  private static int fileLoadingCount = 0;
 
   class MyDesktopManager implements DesktopManager
   {
@@ -890,7 +890,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
     // IF JALVIEW IS RUNNING HEADLESS
     // ///////////////////////////////////////////////
-    if (instance == null || Jalview.isHeadlessMode())
+    if (getInstance() == null || Jalview.isHeadlessMode())
     {
       return;
     }
@@ -1049,7 +1049,7 @@ public class Desktop extends jalview.jbgui.GDesktop
   {
     if (!internalCopy)
     {
-      Desktop.jalviewClipboard = null;
+      Desktop.getInstance().jalviewClipboard = null;
     }
 
     internalCopy = false;
@@ -1888,7 +1888,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     {
       progressPanel = new JPanel(new GridLayout(1, 1));
       totalProgressCount = 0;
-      instance.getContentPane().add(progressPanel, BorderLayout.SOUTH);
+      getInstance().getContentPane().add(progressPanel, BorderLayout.SOUTH);
     }
     JPanel thisprogress = new JPanel(new BorderLayout(10, 5));
     JProgressBar progressBar = new JProgressBar();
@@ -1901,7 +1901,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     ((GridLayout) progressPanel.getLayout()).setRows(
             ((GridLayout) progressPanel.getLayout()).getRows() + 1);
     ++totalProgressCount;
-    instance.validate();
+    getInstance().validate();
     return thisprogress;
   }
 
@@ -3248,7 +3248,7 @@ public class Desktop extends jalview.jbgui.GDesktop
    */
   java.util.concurrent.Semaphore block = new Semaphore(0);
 
-  private static groovy.ui.Console groovyConsole;
+  private groovy.ui.Console groovyConsole;
 
   /**
    * add another dialog thread to the queue
@@ -3481,7 +3481,7 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   public static groovy.ui.Console getGroovyConsole()
   {
-    return groovyConsole;
+    return getInstance().groovyConsole;
   }
 
   /**