vscode-java
vscode-java copied to clipboard
paste a multi-line string should create a java string
try paste this into a string, i.e. between two quotes "":
SELECT payment_date, amount, sum(amount) OVER (ORDER BY payment_date)
FROM (
SELECT CAST(payment_date AS DATE) AS payment_date, SUM(amount) AS amount
FROM payment
GROUP BY CAST(payment_date AS DATE)
) p
ORDER BY payment_date;
in eclipse it becomes a valid java string in vscode it generates non-compilable code.
Would be great if vscode could help here :)
Since the Paste
event is now available to extension, we can definitely provide some help here. @jdneo please also help track this in the area of adopting editor events.
It looks like the relevant API is still just a proposal (https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts), but I'll see if I can get a prototype working. (Also, maybe I'm looking in the wrong place)
Looks like we're waiting for this to become API (as opposed to just proposed API). I think we should just slowly polish our PR, see if it handles our use-case nicely, and then inquire about the time frame for making it API.
You need to set "editor.experimental.pasteActions.enabled": true
for this to work.
i.e.
"editor.experimental.pasteActions.enabled": true
i have no this settings in my vscode
I think the paste action setting has been replaced by editor.pasteAs.enabled
. It should default to enabled though. See https://github.com/microsoft/vscode/pull/181375 .