[Inline Param Name Hints] ... for varargs param shown before param name

This commit is contained in:
Yaroslav Lepenkin
2016-09-28 17:03:19 +03:00
parent 669e4e1c4d
commit f3a059d01e
2 changed files with 4 additions and 4 deletions
@@ -146,7 +146,7 @@ public class ParameterNameHintsManager {
@NotNull
private static InlayInfo createInlayInfo(@NotNull PsiExpression callArgument, @NotNull PsiParameter methodParam) {
String paramName = methodParam.getName() + ((methodParam.getType() instanceof PsiEllipsisType) ? "..." : "");
String paramName = ((methodParam.getType() instanceof PsiEllipsisType) ? "..." : "") + methodParam.getName();
return new InlayInfo(paramName, callArgument.getTextRange().getStartOffset());
}
@@ -121,7 +121,7 @@ public class VarArgTest {
""")
onLineStartingWith("testBooleanVarargs")
.assertInlays("test->13", "booleans...->false")
.assertInlays("test->13", "...booleans->false")
}
fun `test no hint if varargs null`() {
@@ -160,7 +160,7 @@ public class VarArgTest {
""")
onLineStartingWith("testBooleanVarargs")
.assertInlays("test->13", "booleans...->false")
.assertInlays("test->13", "...booleans->false")
}
fun `test do not inline if parameter length is one or two`() {
@@ -399,7 +399,7 @@ public class VarArgTest {
""")
onLineStartingWith("testBooleanVarargs")
.assertInlays("booleans...->isCheck")
.assertInlays("...booleans->isCheck")
}
fun `test if any param matches inline all`() {