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

Adding ability to edit database connection properties in VSCode extension #6079

Merged
merged 9 commits into from
Jun 22, 2023

Conversation

jhorvath
Copy link
Contributor

Adding ability to open property sheet of database connection in VSCode extension.

@jhorvath jhorvath added Need Squashing LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests labels Jun 15, 2023
@jhorvath jhorvath requested a review from sdedic June 15, 2023 07:37
@jhorvath jhorvath self-assigned this Jun 15, 2023
@jhorvath jhorvath requested a review from dbalek June 15, 2023 08:11
Copy link
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pity that the html4j API was not used.

@apache apache locked and limited conversation to collaborators Jun 15, 2023
@apache apache unlocked this conversation Jun 15, 2023
@Ondrej-Douda Ondrej-Douda force-pushed the odouda/GCN-1801/Properties branch 2 times, most recently from 2b80506 to d0a0a62 Compare June 15, 2023 15:27
java/java.lsp.server/vscode/package.json Show resolved Hide resolved
java/java.lsp.server/vscode/package.json Show resolved Hide resolved
java/java.lsp.server/vscode/src/extension.ts Outdated Show resolved Hide resolved
"unknown": unknown
};
export type Property<T extends keyof PropTypeMap = keyof PropTypeMap> = T extends T ? {
propPref: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why all the prop prefixes ? Inconsistent naming: dispName vs. shortName

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taken from return type of NBLS command...

if (propJson instanceof JsonNull) {
return CompletableFuture.completedFuture(null);
}
List m = gson.fromJson((JsonElement) propJson, List.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm ... could be more friendly if the property sets was a map (keyed by set name) instead of array, but the propset name is present in each array's item, so it's probably OK.

Maybe if

List<Map<String, Object>> m = ...

the setAllProperties and others can use strongly typed Map instead of raw type(s) ?

prop.setValue(val);
}
} catch (IllegalAccessException ex) {
Exceptions.printStackTrace(ex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there could be a way how to report a failed set to the client.

Copy link
Member

@sdedic sdedic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least the unnecessary whitespace reformat should be fixed before merge.

Copy link
Member

@sdedic sdedic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's fix the 'exceptional' return values from nbls later - I've filed #6113 for that.

@Ondrej-Douda Ondrej-Douda force-pushed the odouda/GCN-1801/Properties branch 3 times, most recently from ad3bce5 to b6b06dc Compare June 22, 2023 13:31
@thurka thurka force-pushed the odouda/GCN-1801/Properties branch from b6b06dc to d1f4a1a Compare June 22, 2023 15:01
@jhorvath jhorvath merged commit c274d62 into apache:master Jun 22, 2023
34 checks passed
@mbien
Copy link
Member

mbien commented Jun 23, 2023

please don't merge PRs without squashing them properly. Not sure what happened here, e.g the merge commit is missing which makes it difficult to track commits back to their PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants