mpl to let it set the additional imports.
bye Jochen
Gesendet: Donnerstag, 01. November 2018 um 16:19 Uhr
Von: "Keith Suderman"
An: dev@groovy.apache.org
Betreff: Re: Remembering imports between script invocations
Hi David,
I am not a Groovy committer and I am not that familiar
Hi David,
I am not a Groovy committer and I am not that familiar with the Groovy code
base so _I_ can't revise the JSR-223 implementation. I did take a quick look
at the code, and other than having "GroovyScriptEngine" in their names the two
classes (GroovyScriptEngine and
Hi Keith,
I'm "resurrecting" this old thread in an attept to see if we can use Groovy as
the next scritpting language in jAlbum. What I'd really want to achive is to
supply a number of default star imports. This is expecially important as Groovy
sadly doesn't remember imports between script
Import statements are really just shortcuts to tell the compiler how to resolve
class names so there is nothing to "remember" between invocations, that is,
nothing gets added to the Binding.
I am not familiar with the javax.script API, but I suspect that you will have
to provide your own
s more like the Groovy Shell or Groovy Console. Not too sure myself
how the javax.script stuff is tied in.
*From:* David Ekholm [mailto:da...@jalbum.net <da...@jalbum.net>]
*Sent:* Thursday, February 08, 2018 2:47 PM
*To:* dev@groovy.apache.org
*Subject:* Re: Remembering imports betw
gt; From: David Ekholm [mailto:da...@jalbum.net <mailto:da...@jalbum.net>]
> Sent: Thursday, February 08, 2018 2:47 PM
> To: dev@groovy.apache.org <mailto:dev@groovy.apache.org>
> Subject: Re: Remembering imports between script invocations
>
> How do I do that
Sounds more like the Groovy Shell or Groovy Console. Not too sure myself how
the javax.script stuff is tied in.
From: David Ekholm [mailto:da...@jalbum.net]
Sent: Thursday, February 08, 2018 2:47 PM
To: dev@groovy.apache.org
Subject: Re: Remembering imports between script invocations
How do I
How do I do that via the javax.script API?
Even if this is possible via the javax.script API, chances are that a user
wishes to ad-hoc add another import, but as they are forgotten between script
invocations, it makes it hard to use Groovy to interactively create, say a
Swing or JavaFX UI one
You can add all the imports you want to your compiler configuration and they
will be consistently available for all scripts.
From: David Ekholm [mailto:da...@jalbum.net]
Sent: Thursday, February 08, 2018 2:12 PM
To: dev@groovy.apache.org
Subject: Remembering imports between script invocations