Eclipse解决空格自动补全的详细步骤

1 安装Plugin Perspective

(1). Help->Install New Software

(2). “Work With:” -> “–All Available Sites–”

(3). type “Plug-in” into the filter box

(4). Open “General Purpose Tools” (may be called differently in your eclipse version!)

(5). install “Eclipse Plug-in Development Environment”

(6). restart!

2 设置代码提示

打开 Eclipse 依次选择 Window -> Perferences -> Java -> Editor -> Content Assist,Auto activation triggers for Java:设置框中默认是”.” 现在将它改为:
 .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_

3 修改插件

Windows->Show View->Other->Plug-in Development->Plug-ins

然后找到org.eclipse.jface.text

右键选择Import as->Source Project。然后找到

src->org.eclipse.jface.text.contentassist->ComplecationProposalPopup.java

选择Ctrl+F查找

if (contains(triggers, key)),将其修改为

if (key != ‘=’ && key != 0x20 && contains(triggers, key))

保存后将org.eclipse.jface.text导出,选择

export->Plug-in Development->Deployed plug-ins and fragments->next->Archive file

选择你要导出的文件路径和文件名。选择finish,在路径中找到该文件,解压后,找到.jar文件,进入eclipse的安装路径,粘贴到plugin文件夹,选择替换即可。
注意:如果没有src
你的workspace就可以看到这个project了。如果没有src这个文件夹,说明你使用的版本中没有带源代码,我正好也是这种情况。

源代码可以去这个地址下载(找了我好久好久)

http://archive.eclipse.org/eclipse/downloads/

在页面上选择你Eclipse版本的连接(我使用的是4.4.2),然后在新页面中下载eclipse-SDK-(*************).zip,根据自己的需要选择合适的版本下载,大概200M左右。下载完成以后解压缩,在.\eclipse\plugins\文件夹下找到 org.eclipse.jface.text.source_3.9.2.v20141003-1326.jar (这是对应我使用的Eclipse版本的文件,实际请根据你自己的版本进行选择),将这个文件复制到你自己的Eclipse安装目录下的.\eclipse\plugins\文件夹下,然后重新启动Eclipse。重复上面的操作导入(import)org.eclipse.jface.text,此时就能够看到src文件夹了。

  • 4
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值