Eclipse类型提案从3.4变为3.5 - 可配置? [英] Eclipse type proposal change from 3.4 to 3.5 - configurable?
问题描述
如果我已经有导入的类型,在Eclipse 3.4中,我会得到具体的默认类,但是在3.5中,我只需要获得 java.util.Collections
的接口。例如,在这里点击 ctrl + 空格:
If I already have the types imported, in Eclipse 3.4, I get concrete default classes, but in 3.5 I just get the interface for java.util.Collections
. For example, hitting ctrl+space here:
Map map = new
ctrl + space
在3.4,我得到 HashMap ()
,在3.5 Map()
(然后默认为一个新的impl用方法模板)。
On 3.4, i get offered HashMap()
, on 3.5 Map()
(which then gets defaulted to a new impl with methods templated).
对于列表
,在3.4我被提供 ArrayList()
但在3.5 List()
For List
, on 3.4 I'm offered ArrayList()
but on 3.5 List()
only.
这是可以在模板中还是类似的?
Is this configurable in the templates or similar?
推荐答案
我刚刚面对同样的问题。解决方案是首选项 - > Java - >编辑器 - >内容辅助 - >高级
确保您已选择Java建议。一旦你启用它,你应该有类型提议ctrl +空格。
I have just faced the same problem. The solution is Preferences -> Java -> Editor -> Content Assist -> Advanced Make sure you have "Java Proposals" selected. Once you enable this you should have the type proposal on ctrl + space.
这篇关于Eclipse类型提案从3.4变为3.5 - 可配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!