From: Ben Soares Date: Fri, 20 Oct 2023 17:17:04 +0000 (+0100) Subject: JAL-4298 Update help docs to reflect Groovy changes X-Git-Tag: Release_2_11_3_0~3^2~36^2~1 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=f52c6d390a8bbc118582f3ba3ca06170bf9d5e48 JAL-4298 Update help docs to reflect Groovy changes --- diff --git a/examples/groovy/parseproperties.groovy b/examples/groovy/parseproperties.groovy index 322d5e2..ceec6d2 100644 --- a/examples/groovy/parseproperties.groovy +++ b/examples/groovy/parseproperties.groovy @@ -23,8 +23,7 @@ import jalview.datamodel.*; import jalview.gui.AlignFrame; import jalview.gui.AlignViewport; -def af = Jalview.getAlignFrames(); -def al = af[0].viewport.alignment; +def al = Jalview.getCurrentAlignFrame().viewport.alignment; ParseProperties pp = new ParseProperties(al); pp.getScoresFromDescription("Score", "ScanPS Raw Score", "([-0-9.+]+)", true); def sqs = al.getSequenceAt(0); diff --git a/help/help/html/features/groovy.html b/help/help/html/features/groovy.html index cb0b10c..6b5c4c0 100644 --- a/help/help/html/features/groovy.html +++ b/help/help/html/features/groovy.html @@ -20,11 +20,11 @@ * The Jalview Authors are detailed in the 'AUTHORS' file. --> -Groovy Shell +Groovy Console

- The Groovy Shell + The Groovy Console

Groovy (www.groovy-lang.org) @@ -41,8 +41,8 @@ short pause, you should then see the Groovy Console appear. This allows you to interactively execute Groovy - scripts whilst Jalview is running. We've also provided a Calculations→Execute - Groovy Script button so you can execute the currently loaded + scripts whilst Jalview is running. We've also provided a Calculations→Run + Groovy Console Script button so you can execute the currently loaded groovy script whilst viewing an alignment.

@@ -63,31 +63,36 @@ we recommend you also take a look at Jalview's source, since all the public methods of the jalview class hierarchy can be called from Groovy scripts. In addition, the following objects are also defined: +

- -

+ If you specify a --groovy argument before an --open argument + then you should ensure your script doesn't refer to currentAlFrame. +

+ +

A simple script