<< Code Completion - Phase One | Home | Grails Navigation Actions for Eclipse >>

Editing GSPs in Eclipse

The Eclipse XML editor works nicely with GSPs. It's not a GSP editor, but it does a few nice things:
  • Command+Shift+F formats
  • Opening tag completion for html elements, and closing tag completion for any element including taglib elements
  • Syntax highlighting
  • Structure error markers
It doesn't however work out of the box. To get it working:
  1. Window->Preferences
  2. Search for 'Content Types'. In the list navigate to Text->XML
  3. Add '*.gsp' to the file associations list
That's it - happy GSP editing. I wonder how difficult it would be to extend the XML editor to be Groovy/Grails aware?


Re: Editing GSPs in Eclipse

What eclipse version did you use here? Hope it's not the eclipse europa. Anyway it's a nice hack you did there, I've been waiting for this feature in eclipse.

Thanks
james

Re: Editing GSPs in Eclipse

Eclipse 3.2. The GroovyEclipse plugin only works with 3.2 at the moment.

Add a comment Send a TrackBack