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.
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.
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.enabledtonone
The newest extension has enabled inlay hints. They are actually helpful, but if you want to remove them:
Mac: Code -> Preferences -> Settings Windows: File -> Preferences -> Settings.
**Type "inlay" in the search, and disable inlay hints.
To disable this setting Open 'setting.json' file
(CTRL + SHIFT + P and type "Open Settings (JSON)" to open setting.json)
Add this code in this file
"editor.inlayHints.enabled": "off"
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).
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.
None of this worked for me so here is how I fixed it:
When I did settings through CTRL + SHIFT + P and type "Open Settings (JSON)", an uneditable JSON file would pop up called defaultSettings.json that had the setting I needed to change.
Here is an image of this file: defaultSettings.json
I had to find settings through the file directory (win + R) %APPDATA% -> Code -> User -> settings.json
Then I just added "editor.inlayHints.enabled": "off",
Make sure to add a comma at the end of the previous line if there was not an existing one or else an error will appear.
Here is an image of the settings.json file: settings.json
It's called inlay hints. You can set that to not show unless needed.
In Command Palette -> Language Specified Settings -> Java -> Search for inlay
-> Enable or Disable.
P.S. It's really helpful in debugging Problems, So you can set it to "offUnlessPressed".