Thursday, July 3, 2008

Eclipse ${project_loc} errors during Grails development

In your Grails development with Eclipse, if you have ever used the Run Launch configuration provided by Grails or followed Add domain classes etc. instructions on the Grails Eclipse IDE Integration wiki page, you may have received the Eclipse error message “Variable references empty selection: ${project_loc}”.

This is caused by the fact that certain actions can cause Eclipse to loose focus of the current project. To resolve the issue, simply select your current project in the Package Explorer or Navigator and repeat task that caused the error. This can get annoying so another alternative is to replace ${project_loc} with ${workspace_loc}\project_name if your project in your workspace directory.

8 comments:

Wolfgang Schell said...

Hi Chris!

I often encountered this problem as well and it's quite annoying.

Thanks for the solution!

Wolfgang

board tc said...

That helped! Thanks for posting.

board tc said...
This comment has been removed by the author.
Martí Cabré said...

Nice! Thanks for the tip.

Connor said...

I started using ${build_project} instead.

"Returns the absolute file system path of the project currently being built, or the absolute file system path of the resource identified by an optional argument interpreted as a path relative to the project currently being built."

ben said...

Good tip, thanks!

xyzgo122 said...

Oh , thanks, it's nice tip !

merlijn stoffels said...

THANK YOU!