简体   繁体   English

Eclipse Mars:按点时Content Assistant不能完成

[英]Eclipse Mars: Content Assistant doesn't complete when pressing dot

When I type in the first part of a local variable name and press Ctrl + Space in order to show up the content assistant, then it displays the full name of the variable and preselects it. 当我键入局部变量名称的第一部分并按Ctrl + 空格键以显示内容助手时,它将显示该变量的全名并预先选择它。

In Eclipse Luna release the full name becomes inserted if you press . 在Eclipse Luna版本中,如果按,将插入全名. on keyboard and the content assistant shows up all accessible members of this variable instance. 在键盘上,内容助手显示此变量实例的所有可访问成员。

With Eclipse Mars it inserts the dot directly after the incomplete variable name. 使用Eclipse Mars,它会在不完整的变量名称后直接插入点。

How can I switch this behavior back to Eclipse Luna? 如何将这种行为切换回Eclipse Luna?

public class A {
    public int member;

    public void possiblyAll(){

    }
}

public class Test {
    private A aMemberNameWhichIsLong_1;

    private A aMemberNameWhichIsLong_2;

    private A aMemberNameWhichIsLong_3;

    public static void main(String[] args) {
        Test t = new Test();
        t.amem
    }
}

In this example, the caret is located after t.amem . 在此示例中,插入符号位于t.amem之后。 Ctrl + Space displays the full name. Ctrl + 空格显示全名。 Pressing . 按下. closes content assistant and produces this code: t.amem. 关闭内容助手并生成以下代码: t.amem.

In Luna it was: t.aMemberNameWhichIsLong_1. 在Luna中是: t.aMemberNameWhichIsLong_1.

This was a bug introduced by the Code Recommenders plug-in (see answer by @Johannes Dorn for the fix). 这是Code Recommenders插件引入的错误 (有关修复,请参阅@Johannes Dorn的回答)。

You can (temporarily) disable Code Recommenders via Window > Preferences > Code Recommenders > Completions > [x] Enable Code Recommenders code completion 您可以(暂时)通过窗口>首选项>代码推荐>完成> [x]启用代码推荐代码完成功能来禁用代码推荐功能

We have fixed this bug as part of Code Recommenders 2.2.1 我们已将此错误作为代码建议2.2.1的一部分进行了修复

You can update it using our stable update site: http://download.eclipse.org/recommenders/updates/stable/ 您可以使用我们的稳定更新网站进行更新: http : //download.eclipse.org/recommenders/updates/stable/

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

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