JAL-2075 make GroovyConsole a singleton so tests requiring a valid AlignFrame but...
authorJim Procter <jprocter@issues.jalview.org>
Sun, 24 Apr 2016 10:10:32 +0000 (11:10 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sun, 24 Apr 2016 10:10:32 +0000 (11:10 +0100)
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java

index e439696..67152f2 100644 (file)
@@ -922,7 +922,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             .setSelected(av.getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour);
 
     showProducts.setEnabled(canShowProducts());
-    setGroovyEnabled(Desktop.instance.getGroovyConsole() != null);
+    setGroovyEnabled(Desktop.getGroovyConsole() != null);
 
     updateEditMenuBar();
   }
index ba7f255..b7c4098 100644 (file)
@@ -3164,7 +3164,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     Desktop.currentAlignFrame = currentAlignFrame;
   }
 
-  public Object getGroovyConsole()
+  public static Object getGroovyConsole()
   {
     return groovyConsole;
   }