From: Jim Procter Date: Sun, 24 Apr 2016 10:10:32 +0000 (+0100) Subject: JAL-2075 make GroovyConsole a singleton so tests requiring a valid AlignFrame but... X-Git-Tag: Release_2_10_0~249^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1df694418a9563a3bab8b5421a77bc7c83f03f90;p=jalview.git JAL-2075 make GroovyConsole a singleton so tests requiring a valid AlignFrame but no desktop can run --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index e439696..67152f2 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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(); } diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index ba7f255..b7c4098 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -3164,7 +3164,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements Desktop.currentAlignFrame = currentAlignFrame; } - public Object getGroovyConsole() + public static Object getGroovyConsole() { return groovyConsole; }