Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be great to have an option to set the "-parameters" compiler option globally. #3806

Closed
fp024 opened this issue Oct 8, 2024 · 2 comments

Comments

@fp024
Copy link

fp024 commented Oct 8, 2024

[provide a description of the issue]

Environment
  • Operating System: Windows 11
  • JDK version: 17
  • Visual Studio Code version: 1.94.0
  • Java extension version: 1.35.1

Hello,

I am aware that there is a GUI menu to set the "-parameters".

However, when I execute "Clean Java Language Server Workspace", the option gets reset, which feels a bit inconvenient.

So, it would be nice to have an option to set it globally in something like User Settings.json.

Thank you. 👍

@jdneo
Copy link
Collaborator

jdneo commented Oct 9, 2024

Root cause is that by default the .settings folder is stored in the workspace. So it will get removed once the workspace is cleaned.

@fp024
Copy link
Author

fp024 commented Oct 9, 2024

@jdneo

Thank you for your response.

The reason I submitted the issue was because I frequently ran "Clean Java Language Server Workspace" due to the issue mentioned here: [#3797]
This reset the settings, so I thought it would be helpful to have a global setting option.

However, while searching, I came across this post:

I tried the following steps:

  1. Create the file "${PROJECT_ROOT}/.settings/org.eclipse.jdt.core.prefs".
    💡 In my case, I've never opened this project to eclipse, so the .settings folder didn't exist.

  2. Add the following content to the "org.eclipse.jdt.core.prefs" file:

    org.eclipse.jdt.core.compiler.codegen.methodParameters=generate

After doing this, the option remains intact even after the completion of running 'Clean Java Language Server Workspace.

I'll close the issue now. Thank you. Have a great day. 👍

@fp024 fp024 closed this as completed Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants