mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Inline Param Name Hints] ... for varargs param shown before param name
This commit is contained in:
+1
-1
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -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`() {
|
||||
|
||||
Reference in New Issue
Block a user