-->

Eclipse Mars: Content Assistant doesn't comple

2020-03-13 08:51发布

问题:

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.

In Eclipse Luna release the full name becomes inserted if you press . 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.

How can I switch this behavior back to 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. Ctrl+Space displays the full name. Pressing . closes content assistant and produces this code: t.amem.

In Luna it was: t.aMemberNameWhichIsLong_1.

回答1:

This was a bug introduced by the Code Recommenders plug-in (see answer by @Johannes Dorn for the fix).

You can (temporarily) disable Code Recommenders via Window > Preferences > Code Recommenders > Completions > [x] Enable Code Recommenders code completion



回答2:

We have fixed this bug as part of Code Recommenders 2.2.1

You can update it using our stable update site: http://download.eclipse.org/recommenders/updates/stable/