-
Notifications
You must be signed in to change notification settings - Fork 456
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
Make custom pasting less eager #3444
Comments
Interestingly, the vscode-java contributed paste edit isn't always present. If I paste xml within the type declaration, the vscode-java paste edit is never created. However, when done in the import area, it is. I think this might actually be a bug in the language server.
the original paste text is returned in a lot of "failing" cases, or if we're not within a type declaration : So we probably need to try returning vscode-java/src/pasteEventHandler.ts Lines 103 to 104 in b8fd158
The client is already set up to ignore the handler if the delegate doesn't return anything. |
@hopehadfield , interested in this ? Should be easy to fix, but just requires a bit of verifying the desired behaviour. |
@hopehadfield , are you able to reproduce the behaviours described in (without the PR that fixed this) : #3445, #3236, #3237, #3164 . Does this fix them ? Update: I think it does! 😎 |
@rgrunber I could reproduce everything except for the issues relating to multi-cursor paste (those seemed to work fine for me even without this PR). This fixed all the other issues for me though! |
In JBang VS Code, I have my own paste provider to convert Maven XML dependencies into JBang
//DEPS
. Now that vscode-java provides its own provider, it takes over and makes the experience less pleasant:IMO, vscode-java should be more clever and do not return a DocumentPasteEdit if no special handling is necessary (eg. pasted content is not java, or pasting site is not within String quotes.
The text was updated successfully, but these errors were encountered: