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

Integrate hints preferences option in the vscode extension #7082

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ void updateJavaHintPreferences(JsonObject configuration) {
String path = pathPrimitive.getAsString();
Path p = Paths.get(path);
FileObject preferencesFile = FileUtil.toFileObject(p);
if (preferencesFile != null && preferencesFile.isValid() && preferencesFile.canRead() && preferencesFile.getName().endsWith(".xml")) {
if (preferencesFile != null && preferencesFile.isValid() && preferencesFile.canRead() && preferencesFile.getExt().equals("xml")) {
this.hintsPrefsFile = preferencesFile;
}
else {
Expand Down
5 changes: 5 additions & 0 deletions java/java.lsp.server/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@
"description": "Path to the file containing exported formatter settings",
"default": null
},
"netbeans.hints.preferences": {
"type": "string",
"description": "Path to the file containing exported hints preferences",
"default": null
},
"netbeans.java.onSave.organizeImports": {
"type": "boolean",
"default": true,
Expand Down
1 change: 1 addition & 0 deletions java/java.lsp.server/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ function doActivateWithJDK(specifiedJDK: string | null, context: ExtensionContex
documentSelector: documentSelectors,
synchronize: {
configurationSection: [
'netbeans.hints',
'netbeans.format',
'netbeans.java.imports',
'java+.runConfig.vmOptions'
Expand Down
Loading