-
Notifications
You must be signed in to change notification settings - Fork 917
Rich HTML UI for (now only for) VSCode Refactorings #3349
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
Conversation
… into jtulach/WebViews
…e the refactoring UI also works in NetBeans
.../src/org/netbeans/modules/java/lsp/server/refactoring/ChangeMethodParametersRefactoring.java
Show resolved
Hide resolved
c25e84e to
1244c27
Compare
…e it to Maven central
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java
Show resolved
Hide resolved
… show the HTML UI only, when supported
|
Opps, I wanted to create a new PR, but instead I integrated 9e27e19 into We don't have a way to remove commit from |
Aside - it happens! 😄 I've long been in the habit of using |
This PR contains the prototyping work we (Jirka Sedláček, Dušan Bálek and me) have done to make sure Rich UI for Change Parameters Refactoring can be productized. All changes were squashed and integrated by #3357 and #3361. This PR is now closed, but holds history of individual commits and few changes showing how to use and test the HTML UI in classical NetBeans IDE.
By default VSCode UI follows principles of asceticism and is very simplistic and straightforward. It is possible to use
WebViewfor more complex UIs, but:Anyway we really need it for the refactoring and we made it. Here is the result:
My goal is to get this into January version of NetBeans and its VSCode extension. That requires fixes in HTML/Java API, some API fixes in NetBeans itself and then implementation of the refactoring. Those changes were done by #3357 and #3361.
The remaining (unmerged) part of this PR demonstrates how to use the HTML UI in NetBeans. It adds two actions into refactoring menu:
The first action opens dialog with the same Change Method Parameters Refactoring UI as provided to VSNetBeans by #3361 in a dialog - e.g. it shows sharing of the HTML UI is possible among the Swing and Electron based flavors of the IDE. Second Open HTML Hello World! action opens a top component with wizard generated sample
showing input line and a button that opens a dialog. I used this example to test that interaction between HTML, Swing and JavaFX works unchanged when refactoring the code in #3357
Cons: I haven't yet convinced JavaFX WebView to load
codicons.cssandcodeicons.ttfas provided by #3361 - as such the HTML UI in NetBeans isn't as slick. Further enhancements into the JavaFX webview integration are needed.