有没有办法让泛型在IntelliJ中的类声明中自动完成?

Kod*_*odi 6 intellij-idea

如果我有这样的界面:

public interface GenericDAO<T, PK>
Run Code Online (Sandbox Code Playgroud)

我想在IntelliJ中扩展该接口,我将ctrl-space在这一点上使用:

public interface ApplicationDAO extends Generic
Run Code Online (Sandbox Code Playgroud)

我希望这个:

public interface ApplicationDAO extends GenericDAO<T, PK>
Run Code Online (Sandbox Code Playgroud)

但相反,我得到了

public interface ApplicationDAO extends GenericDAO
Run Code Online (Sandbox Code Playgroud)

没有迹象表明可以使用泛型.有没有办法让它正确地做到这一点?我是IntelliJ的新手,所以我很快就学会了它的全部内容.

Pet*_*mov 0

目前 IDEA 中无法插入此类无效泛型。要知道它们在那里,您可以查看完成列表,它们在建议中进行了描述。您还可以启用“参数化类的原始使用”检查,以便每个不使用泛型的类在编辑器中以黄色突出显示。

  • 此功能有更新吗?是否有一个问题/功能请求可供我投票?如果没有这个,来自 Eclipse 的人可能会非常失望。 (2认同)