[英]How to make code completion for Java 8 lambda parameters in Eclipse work?
Suppose I have an interface like this: 假设我有一个像这样的接口:
@FunctionalInterface
public interface ModifierFunction {
Game applyModifier(Game game, Card card, Modifier modifier);
}
and some class where I use it: 还有一些我使用它的类:
SHOWDOWN_BUFF((game, card, modifier) -> {
game. // <- I get no proposals from Eclipse here
return game;
})
My problem is that if I press Ctrl + Space I can't see Game
's methods...in fact I get no proposals at all. 我的问题是,如果我按Ctrl + 空格键,我将看不到
Game
的方法...实际上我根本没有任何建议。 It does not work if I use this syntax either: 如果我使用以下语法之一也不起作用:
SHOWDOWN_BUFF((Game game, Card card, Modifier modifier) -> {
game. // <- I get no proposals from Eclipse here either
return game;
})
How can I get code completion to work in Eclipse Luna for Java 8? 如何使代码完成在Eclipse Luna for Java 8中工作?
edit : I'm using Version: Luna Service Release 1 (4.4.1) 编辑 :我正在使用版本:Luna Service Release 1(4.4.1)
Parameter completion within Java 8 Lambda expression works with Eclipse Mars (4.5.0). Java 8 Lambda表达式中的参数完成可与Eclipse Mars(4.5.0)一起使用。 https://www.eclipse.org/eclipse/news/4.5/jdt.php
https://www.eclipse.org/eclipse/news/4.5/jdt.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.