博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Eclipse代码自动完成功能
阅读量:7236 次
发布时间:2019-06-29

本文共 2658 字,大约阅读时间需要 8 分钟。

accepted

Found the answer via this question: 

Basically the auto activation trigger for auto-complete by default is set to only the character ".".

To make code assist / auto complete trigger always, you have to change the string to:

.abcdefghijklmnopqrstuvwxyz

In v21.x.x version of ADT, this is located in Preferences -> Java --> Editor --> Content Assist.

15
accepted

you can also set auto completion to open automatically while typing: write .abcdefghijklmnopqrstuvwxyz in "Auto activation triggers for Java" field, in Java/Editor/Content Assist.

see this question for more details: 

|
 
   
This is exactly what I wanted! Thanks! –  

6

Use the Ctrl+Space shortcut for getting all possible autocomplete options available in a particular context in the editor.

Auto Complete will also allow you to insert custom code templates into the editor, with placeholders for various inputs. For instance, attempting to auto complete the word "test" in a Java editor, in the context of a class body, will allow you to create a unit test that uses JUnit; you'll have to code the body of the method though. Some code templates like the former, come out of the box.

Configuration options of interest

  • Auto-activation delay. If the list of auto complete options is taking too long to appear, the delay can be reduced from Windows -> Preferences -> Java -> Editor -> Content Assist -> Auto Activation delay (specify the reduced delay here).
  • Auto activation trigger for Java. Accessible in the same pane, this happens to be the . character by default. When you have just keyed in typeA. and you expect to see relevant members that can be accessed, the auto completion list will automatically popup with the appropriate members, on this trigger.
  • Proposal types. If you do not want to see proposals of a particular variety, you can disable them from Windows -> Preferences -> Java -> Editor -> Content Assist -> Advanced. I typically switch off proposals of most kinds except Java and Template proposals. Hitting Ctrl+Space multiple times will cycle you through proposals of various kinds.
  • Template Proposals. These are different from your run of the mill proposals. You could add your code templates in here; it can be accessed from Windows -> Preferences -> Java -> Editor -> Templates. Configuration of existing templates is allowed and so is addition of new ones. Reserve usage however for the tedious typing tasks that do not have a template yet.
欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!
本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/archive/2013/03/02/2940023.html
,如需转载请自行联系原作者
你可能感兴趣的文章
我的友情链接
查看>>
git安装
查看>>
sphinx 全文搜索应用(二)
查看>>
mysql存储引擎MyISAM与InnoDB的优劣
查看>>
集群与负载均衡技术的区别
查看>>
Android开发工具
查看>>
uptime命令详解
查看>>
Google超级搜索技巧
查看>>
02_07 JSP内置对象之application
查看>>
oracle 修改服务端字符集导致ORA-12712错误
查看>>
Docker compose 一键部署LNMP平台
查看>>
Hibernate深入浅出(八)持久层操作——延迟加载(Lazy Loading)
查看>>
wlan加密方式
查看>>
python selenium系列(四)元素等待
查看>>
鸟哥学习笔记---quota
查看>>
我是如何学习NodeJs的 – 笔记
查看>>
Linux日常管理技巧(2):free,ps,netstat命令和抓包工具
查看>>
.NET 4 并行(多核)编程系列之二 从Task开始
查看>>
DiRT2 DirectX 11 Technology
查看>>
C++编程->容器及选用总结
查看>>