[Parameter Name Hints] show for binary and polyadic expressions

This commit is contained in:
Yaroslav Lepenkin
2016-10-18 18:08:36 +03:00
parent c9dfdab0c9
commit 45bce36692
2 changed files with 19 additions and 1 deletions
@@ -95,7 +95,10 @@ public class JavaParameterHintManager {
|| JavaTokenType.PLUS.equals(tokenType)) && expr.getOperand() instanceof PsiLiteralExpression;
}
if (callArgument instanceof PsiThisExpression) {
if (callArgument instanceof PsiThisExpression
|| callArgument instanceof PsiBinaryExpression
|| callArgument instanceof PsiPolyadicExpression)
{
return true;
}
@@ -662,5 +662,20 @@ class Key {
onLineStartingWith("System.set").assertNoInlays()
onLineStartingWith("new").assertNoInlays()
}
fun `test poly and binary expressions`() {
setup("""
class Test {
void test() {
check(1 + 1);
int i=1; check(1 + 1 + 1);
}
void check(int isShow) {}
}
""")
onLineStartingWith("check").assertInlays("isShow->1")
onLineStartingWith("int").assertInlays("isShow->1")
}
}