Eclipse content assist not working in enum constant parameter list

痴心易碎 提交于 2021-01-27 06:08:35

问题


Using eclipse, when I enter the following:

public enum Foo {
    A(Integer.);
    private final Integer integer;

    private Foo(Integer integer) {
        this.integer = integer;
    }
}

And position my cursor after Integer. and ask for content assist (^space) I get nothing. In fact content assist does not seem to work at all inside enum constant argument lists.

Is this a known problem or expected behaviour? If the latter, why?

EDIT: I'm wondering if this is a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=395604

If so I'm amazed that such an obvious thing hasn't been fixed in the past 5 years with the number of Java developers using Eclipse.


回答1:


Yes, you're right, it is a known bug or at least a missing feature of the Eclipse Java IDE:

Eclipse Bug 395604 - Code assist does not work after anonymous class inside in an array initializer

In the last 5 years, there have been only a few votes for this bug and also only very few comments, so it doesn't seem to be particularly important for most users. I voted for the bug and added a comment with a link to your question. Eclipse is open source and the bug is tagged with helpwanted. So any Java developer is welcome to make Eclipse a little bit better by implementing this.



来源:https://stackoverflow.com/questions/47481597/eclipse-content-assist-not-working-in-enum-constant-parameter-list

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!