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

Source Action: Override/Implement Methods... #900

Closed
testforstephen opened this issue Dec 13, 2018 · 3 comments
Closed

Source Action: Override/Implement Methods... #900

testforstephen opened this issue Dec 13, 2018 · 3 comments

Comments

@testforstephen
Copy link
Contributor

testforstephen commented Dec 13, 2018

Although we have supported the quick fix Add unimplemented methods, it will be also helpful to support it on Source Action.

Currently most source actions return java.apply.workspaceEdit command, but for Override/Implement action, one idea is to return a customized command, such as java.action.overrideMethod to client. When the command is executed on client, client will send a request to server to get all possible methods from super class or interface first, then prompt to select the target methods, after that, send the selected methods info to server to compute the TextEdit change, and apply change.

@testforstephen
Copy link
Contributor Author

@yaohaizh @fbricon Any more thoughts?

@fbricon
Copy link
Contributor

fbricon commented Dec 13, 2018

the interesting aspect of this approach is we wouldn't need to compute all textedits on each code action request.

  • I'd call it java.action.overrideMethodsPrompt
  • would only be sent to clients explicitely announcing they support it

@testforstephen
Copy link
Contributor Author

yes, yes. it's kind of lazy load. be able to reduce the compute cost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants