-
Notifications
You must be signed in to change notification settings - Fork 453
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
Enable Source Action 'Override/Implement Methods' with prompt #749
Enable Source Action 'Override/Implement Methods' with prompt #749
Conversation
ff23b22
to
6422023
Compare
src/sourceAction.ts
Outdated
|
||
const selectedItems = await window.showQuickPick(quickPickItems, { | ||
canPickMany: true, | ||
placeHolder: 'Select methods to override or implement.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally it should be Select methods to override or implement in <Type>
, as when you're in an anonymous class, within a top level class, it's pretty confusing to know which type will receive the implemented methods.
src/protocol.ts
Outdated
} | ||
|
||
export namespace OverridableMethodsRequest { | ||
export const type = new RequestType<CodeActionParams, OverridableMethod[], void, void>('java/overridableMethods'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need a OverridableMethodsResponse object, that'd contain:
- type: String
- methods: OverridableMethod[]
that type can be displayed in the quickpick placeholder
b6e82fd
to
ef43fdf
Compare
Signed-off-by: Jinbo Wang <[email protected]>
ef43fdf
to
f0c6d82
Compare
In VSCode 1.30.1 (2018 November), CodeActionParams passed the correct cursor line in the After i updated to VSCode 1.31.0 (2019 January), i reproduced the scenario you mentioned. That's because the code action didn't pass the cursor line, Not sure whether it's VSCode bug. |
Create an issue microsoft/vscode#68487 |
Since the upstream issue has been fixed, we'll push this feature in the next release. |
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang [email protected]
It uses quick pick to list all possibles overridable methods from super types. And select the unimplemented methods by default.