X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=help%2Fhelp%2Fhtml%2Ffeatures%2Fgroovy.html;fp=help%2Fhelp%2Fhtml%2Ffeatures%2Fgroovy.html;h=6b5c4c06891ba411ea09e8ae430ca97ccafc94a2;hb=1140532d01b32b648e7e5b17ea717ae790625f8f;hp=cb0b10c667595dd0bcf46df282289943ec02c4fb;hpb=c3d723759ba265ecdd89ddef7d59ebc9f33de784;p=jalview.git 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. -->
-- 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: +
- -jalview.bin.Jalview
.jalview.bin.groovy.JalviewObject
providing access to the following useful
+ methods:
Jalview.getCurrentAlignFrame()
will return the new AlignFrame
.currentAlFrame
us updated to that alignment.
+ If you specify a --groovy
argument before an --open
argument
+ then you should ensure your script doesn't refer to currentAlFrame
.
+
+ +
A simple script
-def alf = Jalview.getAlignFrames(); -print alf[0].getTitle(); -def alignment = alf[0].viewport.alignment; +def al = Jalview.getCurrentAlignFrame(); +print al.getTitle(); +def alignment = al.viewport.alignment; def seq = alignment.getSequenceAt(0);