Hi everyone, and welcome to the July Update for Visual Studio Code Java. We've brought an update on Lombok support and some other basic user experience improvements. let's start!
Lombok Support
Lombok is a popular Java framework and we keep hearing from users that our plugins don't work well when they have a Lombok dependency in their project. So we started a series of investigations on this. Now we're happy to announce that our plugin package has full built-in support for Lombok . You should no longer have any weird issues with Lombok, please use it and give us feedback.
We also know that some developers have installed the Lombok plugin on the community, the original author @GabrielBB will no longer maintain the plugin due to personal reasons, so Microsoft will maintain the plugin from now on. We would like to thank @GabrielBB who started it all and provided initial support for Lombok. If necessary, we will add new functionality to this plugin and make it compatible with our Java plugin package.
Let's talk about the new features we've added to Lombok.
Lombok plugin
Enable Lombok support and user notifications
When opening the project for the first time, if our plugin detects the presence of a Lombok dependency. We will send a notification to alert developers if Lombok support needs to be enabled. After reloading Visual Studio Code, Lombok support kicks in. Here is a short demo.
Manage Lombok versions in the language status bar
After enabling Lombok support, developers can see the current Lombok version and status in the language status bar. If the developer clicks on the item, it will take the developer to the place to configure the Lombok version, which will make it easy for the developer to change the Lombok version. After changing the Lombok version, there will be another notification asking the developer to reload Visual Studio Code. Here is another demo.
Lombok support settings
If developers don't want built-in Lombok support, we've added a setting to turn it on/off. Just go to settings and search for "lombok". Here is a screenshot.
User experience improvements
In addition to Lombok, there are several UX improvements that will make your coding experience even better.
Drag and drop support
We now have "drag and drop" enabled in the Java Project Explorer view, and you can use it to do things that are convenient for you.
Here are a few examples of scenarios where it is used:
- Move a class - drag a class from one package to another
- Move Packages – Drag one package into another
- Add Dependencies - Drag the JAR file directly from the OS into the "Referenced Libraries" of the Java project (Java project without build tools)
Let's see a quick demo of the first scenario
Embed prompt exclusion list
In our April blog, we first covered Inlay Hints for parameter names. We've heard from users that they like this feature in general, but in some cases, they may not want it. Therefore, we've added a setting so that you can disable embed prompts in some cases. You can find this setting by typing "inlay exclusion" and clicking it under Java. Here is a screenshot.
Debugging – supports function breakpoints
This feature request was originally raised in the community and resolved in the latest. Starting with Extension Pack for Java version 0.24. You can set a function breakpoint in Visual Studio Code by clicking the "+" button in the Breakpoints view and entering the full method name of the Java class. In debug mode, the debugger pauses at the function name you specify, and the debugger displays information about the execution context. This works even when the functions have the same name (overloaded functions). Here is a quick demo.
Feature Request: https://github.com/microsoft/vscode-java-debug/issues/258Extension
Pack for Java 0.24:
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
More code operations
Lastly we would like to mention that over the past few months we have been adding more code actions to the Quick Fix prompt and making the prompt's actions smarter based on the current code (here's a screenshot), so please try it out and Give us more feedback!
Continuous Spring Improvements – Bean Dependency View
In last month's blog, we released the brand new Spring Boot Dashboard, but our improvements to the Spring experience continue. The new feature we bring to you this time is the bean dependency view. As a Spring developer, bean dependencies are something we deal with a lot and sometimes we might want to visualize them. We add this functionality to the Spring Boot Dashboard. You can access this view when you start your application from the Spring Boot Dashboard and click the button on the right. From there, you can access a bidirectional dependency view. You can see what beans this bean is injected into, and what beans this bean depends on. Let's see a quick demo.
feedback and suggestions
There will be many exciting updates to Java on Visual Studio Code in 2022, and as always, your feedback and suggestions are very important to us and will help shape our future products. There are several ways to leave us feedback
- Fill out the Chinese questionnaire
- comment under this post
- Create an Issue on our GitHub repo
- Send an email to vscjfeedback@microsoft.com
Fill out the Chinese questionnaire:
https://www.research.net/r/vscodejava?lang=en
Create an Issue:
https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-java-pack%2Fissues%2Fnew%2Fchoose
resource
The following links and resources can help you better understand Java on Visual Studio Code
- Learn more about Java on Visual Studio Code
- Step-by-step exploration of Java tutorials on Visual Studio Code
More Visual Studio Code on Java:
https://code.visualstudio.com/docs/languages/java?ocid=AID3045631
Java Tutorial for Visual Studio Code:
https://code.visualstudio.com/docs/java/java-tutorial?ocid=AID3045631
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。