eclipse自动完成 [英] eclipse autocomplete

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

问题描述

我注意到,qtCreator处理的自动完成比eclipse要好得多。

I have noticed that qtCreator handles the autocompletion much better than eclipse.

例如,如果我有一行表示'object.firstItem()'并放置我的光标在'。'和'f'之间,然后删除'第一个'(因此成为对象| item()),然后按ctrl +空格并选择'secondItem()',qtCreator guesses'object.secondItem );',而eclipse选择'object.firstItem()Item()'。

For example, if I have a line that says 'object.firstItem()' and put my cursor between '.' and 'f', and then delete the 'first' word (thus becoming object.|item()) and then press ctrl+space and choose 'secondItem()', qtCreator guesses 'object.secondItem();', whereas eclipse chooses 'object.firstItem()Item()'.

可能还有其他功能存在于qtCreator中,但不在eclipse中,虽然这是我真正注意到的唯一一个。但是为什么不分享所有好的想法,因为它们都是开源的?我会对qtCreator和eclipse的所有好的功能感兴趣。

There could well be other features that are present in qtCreator too but not in eclipse, though it's the only one I really noticed. But why not share all good ideas since they all are open source ? I would be interested in all good features of qtCreator and eclipse combined.

有没有办法在eclipse中有这样的行为,通过配置或通过插件? / p>

Is there a way to have such a behaviour in eclipse too, through configuration or through a plugin ?

推荐答案

Eclipse也支持此功能。 (或更具体地说,Eclipse Java开发工具。)

This feature is supported by Eclipse, too. (Or more specifically, the Eclipse Java Development Tools.)

只要按照 ctrl 键,从建议的完成列表中选择项目在插入覆盖完成模式之间切换。

Just hold down the ctrl key when selecting the item from the list of proposed completions to toggle between inserting and overwriting completion mode.

要更改默认行为,请转到首选项 - > Java - >编辑器 - >内容辅助,并将最高级的单选按钮从完成插入更改为完成覆盖。

To change the default behaviour, go to Preferences -> Java -> Editor -> Content Assist and change the top-most radio button from "Completion inserts" to "Completion overwrites".

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

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