LSP: Html4J UI modified work over LSP.#4040
Conversation
|
With be02cff one should be able to stop the Java execution before sending a message to VSCode: And just by setting |
|
The Change Refactoring UI seems to be working with |
e83b394 to
6c9ab9a
Compare
|
HTML/Java 1.8.1 is available on Maven central. @dbalek please replace 6c9ab9a with proper external binaries. I hope this will make it into NetBeans 15. |
…nt to the WebView
6c9ab9a to
fb8d1c8
Compare
jtulach
left a comment
There was a problem hiding this comment.
Looks great and if it works for VSCode, then perfect!
In addition I'd like to see usage of resources in the JavaFX WebView implementation to load the refactoring.css. Probably the implementation shall create a temporary directory and copy the resources there to get file protocol URL. Right now the SPI returns URL[] and I am afraid it it is going to be of little use - possibly String[] of relative paths to main page would be better. The JavaFX WebView implementation may wait for another PR, but we don't want to create an SPI that is wrong to begin with.
| private void emitScript(StringBuilder sb, String id) throws IOException { | ||
|
|
||
| sb.append("<script id='exec' type='text/javascript'>\n" | ||
| + "const vscode = acquireVsCodeApi();\n" |
There was a problem hiding this comment.
This is a potential security threat. VSCode team tries hard not to allow untrusted scripting code access the API. However, right now your are only running trusted code - but avoid downloading any HTML file or JS file from network.
* LSP: Html4J UI modified work over LSP. * Updating HTML4J to version 1.8.1.


An attempt to rewrite
html4jbased refactoring UI for VSCode to work over LSP.