Home > Mobile >  Why is VS Code showing this these labels or parameter names for System.out.println() in java files?
Why is VS Code showing this these labels or parameter names for System.out.println() in java files?

Time:04-15

I have the java extension pack installed. This just started happening today. Not sure if this is due to some json settings or something else.

inlay hints in java files

CodePudding user response:

The Java tooltip is now showing you the variable names from the methods in question. System.out is a PrintStream. The relevant method signatures are PrintStream.print(String s) and PrintStream.println(String x).

CodePudding user response:

lets say you have a function setPassword that takes parameter of the name newPasswordandoldPassword. So, when you call that function, it would hightlight what the parameter is supposed to be. like


setPassword(newPassword: "SOME_NEW_PASSWORD",oldPassword:"SOME_OLD_PASSWORD")


This is supposed to reduce any confusion as to what value you entered is what. Extremely helpful when working with functions that take multiple parameters.

CodePudding user response:

See Random things such as "s:", "x:", and name of parameters are showing up inside of my print statements: java extension issues.

It's a new feature introduced in 1.5.0, called inlay hint. We use that to display the parameter names of those arguments.

If you do not want to have them in your editor, you can set the setting java.inlayHints.parameterNames.enabled to none

  • Related