Groovy Eclipse插件整理导入 [英] Groovy Eclipse Plugin Organize Imports

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

问题描述

我一直在使用最新版本的groovy eclipse插件(对于eclipse 3.4),我注意到,当我在文件上运行组织导入时,它实际上会删除我需要的一些导入。似乎删除了我的项目,而不是java。*导入。任何想法为什么?



谢谢,
Jeff

解决方案

这个功能已经在Groovy Eclipse插件的3.5流中被修复了。或者至少在编辑器运行组织导入时是固定的。所以,在编辑器内运行Ctrl-Shift-O,或者在保存后运行格式将会起作用。但是,从包资源管理器或任何其他视图运行组织导入将不会。



原因是我们需要一种方法来挂钩特殊的groovy功能。当从编辑器内部组织导入时,这是可以做到的。不过,我们还没有想出在编辑器外面运行JDT组织导入的一般方法。这是值得提出的一个bug。 http://jira.codehaus.org/greclipse


$ b $在发布2.0.0M1之前(在9月底之前),我们将把这个功能移回到3.4,但是我们发现没有很多人使用3.4,所以我们没有保持最新的3.5流。


I've been using the newest version of the groovy eclipse plugin (for eclipse 3.4) and I noticed that when I run organize imports on the file, it actually removes some of the imports that I need. It seems to remove the ones in my project, not java.* imports. Any ideas why?

thanks, Jeff

解决方案

This functionality has been fixed in the 3.5 stream of the Groovy Eclipse plugin. Or at least it is fixed when running organize imports from the editor. So, running Ctrl-Shift-O inside the editor, or running format after save will work. However, running Organize imports from the package explorer or any other view will not.

The reason for this is that we need a way to hook in special groovy functionality. When running organize imports from inside the editor, this is possible to do. Hwoever, we have not figured out a general way to co-opt JDT's organize imports when running outside the editor. It is worth raising a bug for this. http://jira.codehaus.org/greclipse

Before the release of 2.0.0M1 (before the end of September), we will port this functionality back to 3.4, but we are finding that not many people are using 3.4, so we have not kept it up to date with the 3.5 stream.

这篇关于Groovy Eclipse插件整理导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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