Eclipse Groovy和自动补全 [英] Eclipse Groovy and autocompletion

查看:244
本文介绍了Eclipse Groovy和自动补全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SpringSource Tool Suite的当前版本,并安装了Groovy/Grails插件.我可以理解,在定义和使用纯" groovy类/对象时,有些情况会使代码自动完成变得困难.

I am using the current version of SpringSource Tool Suite with the Groovy/Grails plugin installed. I can understand that when defining and using "pure" groovy classes/objects there are cases that make code autocompletion difficult.

但是,如果我在groovy类中使用Java类,那么自动完成功能是否应该按预期工作?例如,我尝试使用org.apache.commons.io.FileUtils类中的"readFileToString". Eclipse仅建议此类使用常规方法,而FileUtils类的列表中没有静态方法.

But if I use Java classes in the groovy class shouldn't the autocompletion feature work as intended? For example i'm trying to use "readFileToString" from the org.apache.commons.io.FileUtils class. Eclipse only suggests groovy methods for this class, there is no static method in the list from FileUtils class.

我的STS安装是否有问题,或者STS中的常规编辑器只是不支持纯Java类的自动完成?

Is it a problem with my installation of STS or maybe the groovy editor in STS just doesn't support autocompletion for pure java classes?

推荐答案

您可能还需要确保您使用的是Groovy-Eclipse插件的最新和最佳版本.在过去的6个月中,它取得了突飞猛进的发展,并且每个版本都变得越来越好.在从父类中查找方法时,我遇到了类似的问题,并且在升级后已解决.我通过SpringSource Tool Suite中的下载获取了Groovy Eclipse.

You may also want to make sure you are on the latest and greatest version of the Groovy-Eclipse plug-in. It has grown by leaps and bounds over the past 6 months, and each release just gets better. I had a similar issue with finding methods from a parent class, and it was resolved after an upgrade. I pick up Groovy Eclipse via the download within SpringSource Tool Suite.

这篇关于Eclipse Groovy和自动补全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆