Hi,
I've seen some IRC discussion about this yesterday. We need to decide
what's the canonical way of doing it in 2.0:
Here's the idea that I currently have:
Step 1(works today)
* Use syntax = plain/1.0 to write the groovy page (you can remove the /
* #* */ hack)
* Use $xwiki.parseGroovyFromPage()
Step 2 (future)
* Same as solution 1 but in addition use the future Document Type to
type the groovy page as a "Groovy Class Page", which means we could
offer a default stylesheet for it that would underneath use the {{code
language="groovy"}} macro to color it for example + add some info at
the top explaining why this page exists.
Step 3 (future)
* Deprecate the $xwiki.parseGroovyFromPage() api to move it to a
proper place, either in the script module (if it can be generified for
all scripting languages) or in script-groovy submodule of xwiki-script
and accessed through the new Services proposal (see
http://markmail.org/thread/g4z56pl734lng2ym
).
WDYT?
Thanks
-Vincent