Skip to content

Commit a41699e

Browse files
authored
0.9.0 release notes (#355)
* 0.9.0 release notes Signed-off-by: Rome Li <[email protected]> * Fix typos and errors Signed-off-by: Rome Li <[email protected]> * Fix wording Signed-off-by: Rome Li <[email protected]> * Fix URLs Signed-off-by: Rome Li <[email protected]>
1 parent 2f77c40 commit a41699e

11 files changed

+200
-0
lines changed

release-notes/v0.9.0.md

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
# What's new in Visual Studio Code Java?
2+
3+
*April 2020*
4+
5+
Welcome to the April 2020 release of Java Extension Pack. This document aims to recap the features, bug fixes around Java language support in between releases. Here are some of the key highlights:
6+
7+
- [Performance Improvements](#performance-improvements)
8+
- [Syntax Mode](#syntax-mode)
9+
- [Java 14](#java-14-supported)
10+
- [Call Hierarchy](#call-hierarchy)
11+
- [Data Breakpoint](#data-breakpoint-supported)
12+
- [Code Actions](#more-code-actions)
13+
- [SonarLint](#sonarlint)
14+
- [Work with JAR Files Directly](#work-with-jar-files-directly)
15+
- [Create New Class from File Explorer](#create-new-class-from-file-explorer)
16+
- [MicroProfile](#microprofile)
17+
- [Others](#others)
18+
19+
## Performance Improvements
20+
21+
The Java Language Server (the language server) has improved its speed of ***startup***, and the speed to ***import*** Maven projects. The team has been committed, and here are what they delivered so far.
22+
23+
### Code Navigation in 10 Seconds
24+
25+
Tired of waiting on the language server to start? Now the wait is over. With the help of the new Syntax Server, you will be able to use a fair amount of features within 10 seconds:
26+
27+
![Syntax Server Startup](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/syntax-server-startup.gif)
28+
29+
This is useful especially when you open a project for the first time. Instead of waiting for all the dependencies to be downloaded, you can use the features listed below right away:
30+
31+
- Syntax Highlighting & Syntax Errors
32+
- Code Navigation (Go to Definition, etc.)
33+
- Documentation (Hover to See Javadoc)
34+
- Code Structures (Outline, Folding Range, etc.)
35+
36+
If you are interested in the technical details behind this, check out the [Syntax Mode](#syntax-mode) section.
37+
38+
### Download Maven Dependencies in Parallel
39+
40+
If you are using Maven and your project depends on lots of artifacts from Maven Central, here's a piece of good news for you. The language server now downloads Maven dependencies in parallel, and it will save you lots of time. It happens automatically when you open a Maven project so you don't need to do anything. Enjoy!
41+
42+
## Syntax Mode
43+
44+
When you drag and drop some Java files in VS Code, you probably only want to view the code, but might not be interested in the type errors. The Syntax Mode came to rescue by hiding those type errors and only reporting syntax errors. Besides that, it also parses the code and provides structure info, so you can see outlines and fold/unfold code blocks. You can tell whether you are in syntax mode by checking out this message in the `PROBLEMS` view:
45+
46+
![Syntax Mode Indicator](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/syntax-mode-indicator.png)
47+
48+
Syntax Mode is more than just syntax info. It allows you to browse the known types that are defined in your *local source*, or the *JDK*. You can navigate to the definition or the references to those types, and hover to view the documentation.
49+
50+
However, if you do want to see all the type errors, you can switch between Syntax Mode and Full Mode by right-clicking on the warning message:
51+
52+
![Syntax Mode Switch](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/syntax-mode-switch.png)
53+
54+
Syntax Mode is also the foundation of the performance improvement which enables Code Navigation in 10 seconds. It is tolerant and is capable of working with missing types. So in Syntax Mode, you don't have to wait for the dependencies to be resolved.
55+
56+
## Java 14 Supported
57+
58+
Java 14 is out and is supported by the language server now. To use the preview features, you may need to modify your project settings.
59+
60+
Maven - modify `pom.xml`:
61+
62+
```xml
63+
<build>
64+
<pluginManagement>
65+
<plugins>
66+
<plugin>
67+
<artifactId>maven-compiler-plugin</artifactId>
68+
<configuration>
69+
<release>14</release>
70+
<compilerArgs>--enable-preview</compilerArgs>
71+
</configuration>
72+
</plugin>
73+
</plugins>
74+
</pluginManagement>
75+
</build>
76+
```
77+
78+
Gradle:
79+
80+
```groovy
81+
sourceCompatibility = 14
82+
83+
tasks.withType(JavaCompile) {
84+
options.compilerArgs += '--enable-preview'
85+
}
86+
tasks.withType(Test) {
87+
jvmArgs += "--enable-preview"
88+
}
89+
```
90+
91+
> Note: if you are modifying a project that was already opened in VS Code before, you may need to force clean the workspace and reload. To do so, run command `Java: Clean the Java language server workspace`.
92+
93+
## Call Hierarchy
94+
95+
Call Hierarchy is supported now! To show call hierarchy info, right-click in a function body and pick "`Show Call Hierarchy`":
96+
97+
![Call Hierarchy](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/call-hierarchy.gif)
98+
99+
You can also peek the info in-place by picking "`Peek -> Peek Call Hierarchy`" instead.
100+
101+
And for those who are looking for *Type Hierarchy*, we are working on it and stay tuned.
102+
103+
## More Code Actions
104+
105+
Tons of new code actions have been added to make your life easier. To access them, click on the `light bulb` 💡 whenever you see it. Or right-click the editor view and pick "`Source Action...`". Here is a list of the newly added code actions:
106+
107+
- Move types
108+
- Create a non-existing package
109+
- Auto-import on paste
110+
- Inline refactoring
111+
- Convert for-loop to for-each loop
112+
- Convert anonymous class to nested class
113+
- Add `final` modifier where possible
114+
- Remove the `final` modifier
115+
- Remove unnecessary cast
116+
- Assign statement to new variable/field
117+
- Remove redundant interfaces
118+
- Add missing case labels in `switch` statements
119+
- Quickfix to correct access to static elements
120+
- Quickfix for non-accessible references
121+
122+
## Data Breakpoint Supported
123+
124+
VS Code Java now supports *Data Breakpoint*, so you can have the debugger break when a variable changes its value. Please note that the data breakpoint can only be set inside a debug session. That means you need to launch your application and break on a regular breakpoint first. Then you can pick a field in the `VARIABLES` view and set a data breakpoint. See the illustration below:
125+
126+
![Data Breakpoint](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/data-breakpoint.png)
127+
128+
## SonarLint
129+
130+
[SonarLint](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarlint-vscode) is a popular IDE extension that helps you detect bugs and vulnerabilities as you write code, which is widely used among Java developers. It’s available in many IDEs and now you can also use it in VS Code. This is a great [collaboration](https://github.com/SonarSource/sonarlint-vscode/pull/28) between the team members from SonarLint, Red Hat and Microsoft. The extension runs in the background and highlights code that poses a quality or security concern. Enjoy!
131+
132+
![SonarLint](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/sonarlint.gif)
133+
134+
We’d like to encourage more developers to join us and improve Java development experience in VS Code together! If you have any idea, please submit an issue to [Java Extension Pack](https://github.com/Microsoft/vscode-java-pack).
135+
136+
## Work with JAR Files Directly
137+
138+
If you just started to learn Java and don't have any clue what Maven or Gradle is, we got you back. Now VS Code Java lets you work with JAR files directly without any build tools. Go to `JAVA DEPENDENCIES` view, find the `Referenced Libraries` node and click the `+` icon:
139+
140+
![Reference JAR Files](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/reference-jar-files.gif)
141+
142+
If you want to fine-tune this, go to `settings.json` and look for the `java.project.referencedLibraries` entry.
143+
144+
```json
145+
"java.project.referencedLibraries": [
146+
"library/**/*.jar",
147+
"/home/username/lib/foo.jar"
148+
]
149+
```
150+
151+
You can tell that the glob pattern is supported. And here's more - you can include/exclude certain files, and attach source JARs:
152+
153+
```json
154+
"java.project.referencedLibraries": {
155+
"include": [
156+
"library/**/*.jar",
157+
"/home/username/lib/foo.jar"
158+
],
159+
"exclude": [
160+
"library/sources/**"
161+
],
162+
"sources": {
163+
"library/bar.jar": "library/sources/bar-src.jar"
164+
}
165+
}
166+
```
167+
168+
## Create New Class from File Explorer
169+
170+
Here to mention a new way of creating a class. Now, when you create a `.java` file in the File Explorer, the language server will automatically generate the class body, and fill the package info for you:
171+
172+
![Create New Class](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/create-class.gif)
173+
174+
You can also create `interface`s, `enum`s, and `record`s in the same way.
175+
176+
## MicroProfile
177+
178+
Our friends from the Eclipse MicroProfile community published several extensions to enhance the development experience.
179+
180+
The [MicroProfile Extension Pack](https://marketplace.visualstudio.com/items?itemName=MicroProfile-Community.vscode-microprofile-pack) is a collection of extensions that can help develop your Java microservices using [Eclipse MicroProfile](https://microprofile.io/). You can quickly generate a MicroProfile project and utilize development tools for runtimes such as [Open Liberty](https://openliberty.io/) and [Quarkus](https://quarkus.io/).
181+
182+
## Others
183+
184+
### Check Build Status
185+
186+
As you code in Visual Studio Code, the language server is building your workspace to provide you the necessary language features. Now you can see the detailed build task status and understand what’s happening behind the scene by simply clicking the language server status icon.
187+
188+
![Check Build Status](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/check-build-status.gif)
189+
190+
### Go to Super Implementation
191+
192+
You can now keep track of class implementations and overriding methods by clicking the "`Go to Super Implementation`" link when hovering:
193+
194+
![Go to Super Implementation](https://github.com/Microsoft/vscode-java-pack/raw/master/release-notes/v0.9.0/go-to-super-implementation.gif)
195+
196+
### Pause/Continue All/Other Threads
197+
198+
If you are dealing with concurrency and debugging multiple threads, the debugger makes it handy to pause/continue all/other threads. You can access this feature by right-clicking on the threads in the `CALL STACK` view in a debug session.
199+
200+
## Happy Coding!
518 KB
Loading
419 KB
Loading
244 KB
Loading
112 KB
Loading
147 KB
Loading
889 KB
Loading

release-notes/v0.9.0/sonarlint.gif

3.53 MB
Loading
29.6 KB
Loading
95.2 KB
Loading

0 commit comments

Comments
 (0)