更改Eclipse自动完成(Content Assist)的行为 [英] Changing the behavior of the Eclipse auto-complete (Content Assist)

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

问题描述

当我在Eclipse中编程时,通常在键入点时打开自动完成\建议框(例如,在键入System.SomeObject.之后,并在输入与任何建议的代码相似的代码时保持打开状态).

When I am programming in Eclipse, the auto-complete \ suggestions box usually opens when typing a dot (for example after typing System. or SomeObject., and stays open while typing a similar code to any of the suggested.

这就是我在说的:

我经常使用自动完成\建议框来发挥自己的优势,并且可能进行一些更改,以便在编程时提高生产率;

I often use the auto-complete \ suggestions box to my advantage, and there are couple of changes I would like to make in order to improve my productivity while programming, if possible;

  • 有什么办法可以使建议框始终可见, 实时显示建议(并在那里显示空白框) 没有可用的建议)?

  • Is there any way to make the suggestions box visible all the time, showing suggestions in real-time (and showing a blank box when there are no available suggestions) ?

是否可以在建议框中添加永久的自定义建议(例如,开关案例模板或诸如public String toString()之类的代码行)?

Is there any way to add permanent custom suggestions to the suggestions box (e.g. a switch case template or a line of code like public String toString()) ?

有什么方法可以对建议框重新排序(例如,通用函数之前的类私有变量或System.out.print()之前的System.out.println())?

Is there any way to re-order the suggestions box (e.g. class private variables before general functions or System.out.println() before System.out.print()) ?

有什么方法可以重新设计建议框-即更改其文本颜色,背景色,重新调整建议框窗口的大小并删除黄色的java-doc弹出窗口?

Is there any way to re-design the suggestions box - i.e changing its text color, background color, re-sizing the suggestions box window and removing the yellow java-doc pop-up?

推荐答案

仅供参考,在Eclipse术语中,此功能称为 Content Assist .

FYI, in Eclipse terminology this feature is called Content Assist.

有什么方法可以使建议框始终可见,实时显示建议(并在没有可用建议时显示空白框)?

Is there any way to make the suggestions box visible all the time, showing suggestions in real-time (and showing a blank box when there are no available suggestions) ?

不,那不可能.您可以随时通过 Ctrl + Space (在Mac上为 Command + Space )调用它

No, that's not possible. You can invoke it any time you want via Ctrl+Space (Command+Space on Mac)

有什么方法可以向建议框添加永久的自定义建议(例如,开关案例模板或诸如public String toString()之类的代码行)?

Is there any way to add permanent custom suggestions to the suggestions box (e.g. a switch case template or a line of code like public String toString()) ?

是的,您可以通过首选项> Java > 编辑器> 模板

Yes, you can add your own templates via Preferences > Java > Editor > Templates

有什么方法可以对建议框进行重新排序(例如,在通用函数之前是类私有变量,还是在System.out.print()之前是System.out.println())?

Is there any way to re-order the suggestions box (e.g. class private variables before general functions or System.out.println() before System.out.print()) ?

并非如此.通过首选项> Java > Content Assist > 高级,可以对提案类型中的循环"顺序进行一些控制>,但这并不是您真正想要的.我认为,提案的顺序是基于当前何时调用Content Assist的.

Not really. There is some control of the order for "cycling" through proposal types via Preferences > Java > Content Assist > Advanced, but it's not really what you're looking for. The order of proposals is, I think, based on the current context of when Content Assist is invoked.

是否有任何方法可以重新设计建议框-即更改其文本颜色,背景色,调整建议框窗口的大小并删除黄色的Java文档弹出窗口?

Is there any way to re-design the suggestions box - i.e changing its text color, background color, re-sizing the suggestions box window and removing the yellow java-doc pop-up?

所有自定义选项均位于首选项> Java > Content Assist 下;颜色选项位于首选项> 常规> 外观> 颜色和字体下,但我认为该颜色弹出窗口可能来自您的操作系统颜色设置.

All of the customization option are available under Preferences > Java > Content Assist; color options are available under Preferences > General > Appearance > Color and Fonts, but I think the colors for that pop-up might come from your operating system color settings.

如果您正在使用(或愿意使用)Eclipse Juno(4.2),则会有一个新的项目调用您可能会发现有趣的代码推荐.

If you're using (or willing to use) Eclipse Juno (4.2) then there is a new project call Code Recommenders that you might find interesting.

这篇关于更改Eclipse自动完成(Content Assist)的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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