简体   繁体   English

Eclipse Oxygen Java 代码完成不起作用?

[英]Eclipse Oxygen Java Code Completion Not Working?

I recently switched to Eclipse Oxygen (Build id: 20171005-1200) and my subjective opinion is that the Java code completion seems to be dumber than when I was using Eclipse Luna.我最近切换到 Eclipse Oxygen(Build id:20171005-1200),我的主观意见是 Java 代码完成似乎比我使用 Eclipse Luna 时更笨拙。 I was hoping that it was just something to do with my setup but I tried creating a brand new workspace and that did not help.我希望这只是与我的设置有关,但我尝试创建一个全新的工作区,但没有帮助。 Below is a small test case where I received no proposals.下面是一个小测试案例,我没有收到任何建议。 In this example, when I get to "Color."在这个例子中,当我到达“颜色”时。 I expected Eclipse to show me a list of some of the color constants.我希望 Eclipse 向我显示一些颜色常量的列表。 Instead Eclipse shows nothing.相反,Eclipse 什么也没显示。 Cycling through the various recommenders results in no proposals for everything.循环浏览各种推荐器导致没有任何建议。 Is anyone else experiencing this type of issue or have any idea how to resolve it?是否还有其他人遇到此类问题或知道如何解决? I switched to Eclipse Oxygen because Lambda support in Eclipse Luna was buggy if the Lambda had generics but am otherwise disappointed by Oxygen compared to Luna我切换到 Eclipse Oxygen,因为如果 Lambda 具有泛型,Eclipse Luna 中的 Lambda 支持是有问题的,但与 Luna 相比,Oxygen 对此感到失望

import java.awt.Color;

public enum Test {
    TEST1(Color.BLACK);

    private final Color color;

    private Test(final Color color) {
        this.color = color;
    }
}

Any suggestions/recommendations would be greatly appreciated任何建议/建议将不胜感激

this use to happen when you change the Eclipse version but keep using the old workspace...当您更改 Eclipse 版本但继续使用旧工作区时会发生这种情况...

create a new workspace for Oxygen and import the old projects into it..为 Oxygen 创建一个新工作区并将旧项目导入其中。

If you get the dreaded 'Code Recommenders' not working dialog box when using Java code completion:如果在使用 Java 代码完成时出现可怕的“代码推荐器”不起作用对话框:

Project -> Clean… -> Check Clean All -> click Clean项目 -> 清理... -> 选中清理所有 -> 单击清理

Worked for me with Oxygen 2 Java Developer: Version: Oxygen.2 Release (4.7.2) Build id: 20171218-0600 Probably due to older version of Eclipse baggage与 Oxygen 2 Java 开发人员一起为我工作:版本:Oxygen.2 发行版 (4.7.2) 构建 ID:20171218-0600 可能是由于旧版本的 Eclipse 行李

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM