Mac OS X (LION)
STS 2.8
Grails 2.0RC1
In grails 2.0 the interactive console offers autocompletion using the tab key. However, while using the Console in STS the tab key inserts a tab. No command completion.
Mac OS X (LION)
STS 2.8
Grails 2.0RC1
In grails 2.0 the interactive console offers autocompletion using the tab key. However, while using the Console in STS the tab key inserts a tab. No command completion.
This is due to limitations of the Eclipse Console. It buffers up and sends data more or less line-by line. So there is really no way to get this to work properly without implementing our own version of the console from scratch. Also due to the fact that Grails is mostly designed to be run from the commandline.
Perhaps you can try to use the Grails popup prompt in STS instead. This does provide for some completion support.
You can open the prompt using CTRL-ALT-SHIFT-G (on the mac one of those keys needs to be replace with CMD key, but I'm not sure which one), or via the grails tools menu.
Press CTRL-SPACE for completion and arrows up-down key to access command history.
Kris De Volder -- SpringSource
Thanks Kris,
I think I'll need to start using the grails console from a Terminal window instead. I do use the Grails popup prompt a lot. But your solution simply starts a new grails shell each time, which is way too slow. One of the main reasons for the grails console is to avoid all the startup time for each grails command. Too bad there wasn't a way we could open a terminal window inside STS just like a grails console.
We use to have a feature in STS that did something like this for Grails 1.3.7 (i.e. reuse the process if possible). But due to changes in Grails 2.0 this no longer works. Been on the fence a little whether it is worth putting in effort to try to make this work again for Grails 2.0. Seems you might care about this. The issue is here:
https://issuetracker.springsource.com/browse/STS-1867
You can vote on it if you want. If it doesn't get a couple more votes we would probably drop it.
> Too bad there wasn't a way we could open a terminal window inside STS just like a grails console.
Yes. That would be nice but is quite a lot of work to implement because we can't reuse the existing Eclipse console for that purpose.
Kris De Volder -- SpringSource