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: http://docs.codehaus.org/display/GROOVY/DSL+Descriptors+for+Groovy-Eclipse Examples are here: http://docs.codehaus.org/display/GROOVY/DSLD+examples 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: http://docs.codehaus.org/download/attachments/204275718/DSLD_meta_script.dsld 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: http://groovy.codehaus.org/Groovy-Eclipse+2.1.1+New+and+Noteworthy#Groovy-Eclipse2.1.1NewandNoteworthy-GroovyEventConsole) 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: this.newProp 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! Andrew --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
Free forum by Nabble | Edit this page |