Posts Tagged ‘Grails’

Grails: extracting text from GSP to resource bundle

Wednesday, October 27th, 2010

By user requests we have added functionality for easy extraction of GSP text to resource bundles. To do this you can select a text fragment, press Alt+Enter and choose the intention “Extract selected text to messages.properties”:

I18nize String dialog will open:

This feature is available in IntelliJ IDEA X #98.231

Grails: debugging GSP

Friday, October 22nd, 2010

Now IntelliJ IDEA X is able to debug GSPs. You can set breakpoints and view variable values or evaluate expressions.

Grails: GSP aware of model returned from controller

Wednesday, September 22nd, 2010

As you already know, we are working on GSP editing improvements in IntelliJ IDEA X. In particular, now the editor knows about the variables that the controller supplies to the view.

Example:

Consider an action returning a bookList variable:

And the corresponding GSP file has access to this variable:

Rename, completion and find usages work as they should.

Grails: completion of controller and action names

Wednesday, September 15th, 2010

We have added more Grails-specific completion in IntelliJ Idea X. In particular, IntelliJ IDEA now knows about action and controller names in most places where they can appear.

In the ‘controller’ and ‘action’ attributes of some GSP tags:

In some method calls (e.g. redirect(…), render(…), chain(…)):

In the URL mappings configuration:

Needless to say, find usages and rename work for such references as well.

Grails: Quick navigation between actions and views

Tuesday, September 14th, 2010

IntelliJ Idea X adds quick navigation for Grails actions and GSP pages. Whenever an action has a same-named view, IDEA creates a gutter icon opposite to the action name. Click that icon and the corresponding page is opened:

As for going back, the GSP editor has a link to the appropriate action at the top:

Groovy-related Configuration Changes

Tuesday, September 8th, 2009

The next Maia EAP brings you massive changes in Groovy, Grails, Griffon, Gant & Gradle support, mostly affecting framework configuration.

First, Grails/Griffon application options are available when you create a project or a module:

You may also choose to import an application from existing sources:

Earlier, you needed Gant & Gradle in module dependencies to run build scripts — quite awkward, because the way you are building your project should not affect its classpath. Now, we have per-project settings for Gant & Gradle:

Also, you can now write Groovy code and get full coding assistance with compilation as long as you have Groovy jars anywhere in a module classpath. Together with the new compiler Resource patterns path constraints feature (/ - path separator; /**/ - any number of directories) this made Groovy facet obsolete. So, there is no Groovy facet anymore.

You can still add any Gr8 libraries to a module via Add Framework Support context action:

Everything you’ve just read about will be available in the next EAP.

Grails Project View

Monday, April 27th, 2009

Do you like Grails? Maia will support a dedicated Grails Project View reflecting logical structure of your Grails Web applications. This view can be selected from the View as list at the top of Project tool window.