From 1df694418a9563a3bab8b5421a77bc7c83f03f90 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 24 Apr 2016 11:10:32 +0100 Subject: [PATCH] JAL-2075 make GroovyConsole a singleton so tests requiring a valid AlignFrame but no desktop can run --- src/jalview/gui/AlignFrame.java | 2 +- src/jalview/gui/Desktop.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.10.2