In Grails 1.3.7, the console plugin has any autocomplete feature? This would be particularly interesting to people learning the language as it 开发者_运维技巧allows for the exploration of methods injected at runtime.
While the console does not have an autocomplete feature, one thing you can do in the console to explore native and injected methods is use the Inspect *
methods from the Script
menu.
My personal favorite is Inspect Last
. You'd use it like this:
Create a simple program, with a trailing object:
def foo = ""
Run this program (
CTRL+R
orCMD+R
)- Choose
Script > Inspect Last
It looks like this:
The reason that GroovyConsole doesn't have code completion is that while you are typing, those commands have not been run. Therefore, there is no practical way to determine the methods on the object at that moment. Even full-blown IDEs like IntelliJ are limited in the kinds of code completion they can offer.
精彩评论