Introducing Groovy-Eclipse DSL Descriptors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Introducing Groovy-Eclipse DSL Descriptors

Andrew Eisenberg
Hi all,

Today, Groovy-Eclipse DSL Descriptor (DSLD) support is available by
default in the nightly build.  This feature is now ready for a wider
audience to try.  DSLDs allow scriptable extensibility for the
Groovy-Eclipse inferencing engine.  Other than a quickstart guide, I
won't go into too many details in this email because we have full
documentation on the codehaus wiki.

Full documentation is here:
Examples are here:

To start:

1. Install the latest nightly build of Groovy-Eclipse
2. Inside of a new or existing Groovy-Eclipse project, copy the DSLD
Meta script into a source folder of the project.  This script provides
editing support for DSLD files themselves and is available here:
3. Create a new DSLD script using the wizard: File -> New -> Groovy
DSL Descriptor
4, In the newly created file, there should be DSLD-specific content
assist and hovers (this comes from the meta-DSLD script).
5. Uncomment the
5. Also, when you add some pointcuts and contribution blocks (see the
documentation) and save, you should immediately see their effects in
other Groovy files in the same project.
6. Some advice to help with finding errors in your scripts:
    * Open the Eclipse error log
    * Open the Groovy Event Console (see here:
7. In the newly created script, uncomment the section:
    currentType(subType('groovy.lang.GroovyObject')).accept {
      property name : 'newProp', type : String, provider : 'Sample
DSL', doc : 'This is a sample.  You should see this in content assist
for GroovyObjects: <pre>newProp</pre>'

8. And then type into a new Groovy script:

9. Hover over "newProp" and you should see the appropriate doc.

10.  Congratulations!  You have now implemented your first DSLD.

We are releasing this feature first to the small-ish audience on this
mailing list first since you here are the ones most likely to create
your own DSLDs.  Although the core DSLD language is pretty much set,
this is still a work in progress and there will be some changes before
the final release.  We are looking for feedback to drive the feature
forward, specifically:

1. Are there any usability issues when creating new scripts?
2. Are there any usability issues when consuming existing scripts?
3. Are there any pointcuts that you require, but are currently missing
from the existing implementation?  What are the most important ones
that you would like to see?
4. Is there anything particularly confusing in the documentation or
the examples?
5. What kinds of scripts would you like to create?

I'm happy to help anyone who is looking to create their own DSLDs, but
don't know where to start.  Thanks.  And happy scripting!


To unsubscribe from this list, please visit: