Add title attribute for Java docs (#6347)

* Update Java profile section to be more specific

* Update Spring Boot dashboard to be more concise

* Update java-build.md

* Add title to videos

* Fix typos
This commit is contained in:
nickzhums 2023-05-26 21:23:11 +08:00 коммит произвёл GitHub
Родитель abccbb4cb3
Коммит dc4deeb91d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 81 добавлений и 81 удалений

Просмотреть файл

@ -31,7 +31,7 @@ Once a Maven project is loaded, the extension will be activated and it will auto
The Maven extension also supports searching Maven Central to resolve unknown types in your source code. You can do this by selecting the **Resolve unknown type** link shown on hover.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Resolve unknown type">
<source src="/docs/java/java-build/maven-resolve-unknown-type.mp4" type="video/mp4">
</video>
@ -39,31 +39,31 @@ The Maven extension also supports searching Maven Central to resolve unknown typ
The extension provides code snippets and auto completion for adding Maven dependencies based on local Maven repositories. See how easy it is to add a new dependency to your `pom.xml` with those convenient features.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Add a new dependency to POM file">
<source src="/docs/java/java-build/maven-pom-editing.mp4" type="video/mp4">
</video>
The extension also enables you to generate effective POM.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate effective POM">
<source src="/docs/java/java-build/maven-effective-pom.mp4" type="video/mp4">
</video>
You can also use the command **Maven: Add a Dependency** (or `maven.project.addDependency`) to help add a new dependency to `pom.xml`. The process is interactive.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Add a dependency">
<source src="/docs/java/java-build/maven-add-dependency.mp4" type="video/mp4">
</video>
You can also add dependencies through the project view, which calls the same Maven command.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Add dependency through project view">
<source src="/docs/java/java-build/maven-add-dependency-2.mp4" type="video/mp4">
</video>
Furthermore, VS Code also supports showing dependencies in a tree view, which allows you to inspect all dependencies in your project at a single place and check for potential issues.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Inspect Maven dependency tree">
<source src="/docs/java/java-build/maven-dependency-tree.mp4" type="video/mp4">
</video>
@ -71,7 +71,7 @@ Furthermore, VS Code also supports showing dependencies in a tree view, which al
By right-clicking each Maven project in the Explorer, you can conveniently run Maven goals.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Run Maven goals">
<source src="/docs/java/java-build/maven-run.mp4" type="video/mp4">
</video>
@ -82,25 +82,25 @@ There are two ways to rerun a goal:
1. In the Command Palette, run **Maven: History**, then select a project and a command from its history.
2. Right-click a project and select **History**. You can then select a previous command from history.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Run goals from Maven history">
<source src="/docs/java/java-build/maven-history.mp4" type="video/mp4">
</video>
You can also specify your favorite commands in settings for future execution.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Specify favorite commands">
<source src="/docs/java/java-build/maven-favorite-command.mp4" type="video/mp4">
</video>
For each plug-in you use with your project, the extension also provides you an easy way to access the goals within each plugin.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Easy way to access goals within each plugin">
<source src="/docs/java/java-build/maven-plugin-goal.mp4" type="video/mp4">
</video>
To debug Maven goals, right-click on a goal and start debugging. The Maven extension will call the Java debugger with the right parameters. This is a handy, time-saving feature.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Debug Maven goals">
<source src="/docs/java/java-build/debug-maven-plugin-goals.mp4" type="video/mp4">
</video>
@ -116,13 +116,13 @@ There are several ways to create a Maven project:
2. Open the **Command Palette** (`kb(workbench.action.showCommands)`), search for **Create Java Project** command.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Create Java Project Command">
<source src="/docs/java/java-build/maven-archetype-command.mp4" type="video/mp4">
</video>
3. Right-click on a target folder and select **Create Maven Project**.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Create Maven Project Command">
<source src="/docs/java/java-build/maven-archetype-folder.mp4" type="video/mp4">
</video>
@ -134,13 +134,13 @@ VS Code supports Gradle Java project (not including Android) via the [Gradle for
When you open a Gradle project in VSCode, you can find some useful Gradle views by clicking the Gradle Side Bar item. **Gradle Projects** view lists all the Gradle projects found in the workspace. You can view, run, or debug Gradle tasks here.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Gradle tasks view">
<source src="/docs/java/java-build/gradle-tasks.mp4" type="video/mp4">
</video>
When there are many Gradle tasks in the workspace, it might be hard to find a specific task. The extension offers a **Pinned Tasks** view to help you pin your favorite tasks so that you can easily find them in a separate view. You can also see recently executed tasks in the **Recent Tasks** view.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Pin a Gradle task">
<source src="/docs/java/java-build/gradle-pinned-recent-tasks.mp4" type="video/mp4">
</video>
@ -154,7 +154,7 @@ In the **Gradle Projects** view, you can find a **Dependencies** item under each
The **Gradle Daemons** view shows the daemon status of the current workspace. It lists all the running Gradle daemons in the same version as the workspace. You can choose to stop a specific one or all the daemons in this view.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Managing Gradle Daemon">
<source src="/docs/java/java-build/gradle-daemons.mp4" type="video/mp4">
</video>
@ -176,13 +176,13 @@ If there is any syntax error (missing characters, type not found, etc.) in the o
The extension supports basic auto completions for a Gradle file, when you're trying to type Gradle closures or properties in a Gradle script, the extension will suggest available closures or properties for you.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Auto completion for Gradle file">
<source src="/docs/java/java-build/gradle-auto-completion.mp4" type="video/mp4">
</video>
When you are trying to declare a new dependency, the extension will provide a dependency candidate list for you.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Auto completion for new dependency for Gradle">
<source src="/docs/java/java-build/gradle-dependency-completion.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -25,7 +25,7 @@ You can search for symbols in the current file or workspace to navigate your cod
To search for a symbol in the current workspace, start by pressing `kb(workbench.action.showAllSymbols)`, then enter the name of the symbol. A list of potential matches will appear as before. If you choose a match that was found in a file that's not already open, the file will be opened before navigating to the match's location. Alternatively, you can also use **Quick Open** (`kb(workbench.action.quickOpen)`) then enter the '#' command to search the current workspace. `kb(workbench.action.showAllSymbols)` is just the shortcut for the '#' commands, so everything works the same.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Search for symbols in the workspace">
<source src="/docs/java/java-editing/search-in-workspace.mp4" type="video/mp4">
</video>
@ -33,7 +33,7 @@ To search for a symbol in the current workspace, start by pressing `kb(workbench
To search for a symbol in the current file, use **Quick Open** (`kb(workbench.action.quickOpen)`) then enter the '@' command, then enter the name of the symbol you're looking for. A list of potential matches will appear and be filtered as you type. Choose from the list of matches to navigate to its location.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Search for symbols in current file">
<source src="/docs/java/java-editing/search-in-file.mp4" type="video/mp4">
</video>
@ -55,7 +55,7 @@ You can keep track of class implementations and overriding methods by clicking t
![Spring Navigation](images/java-editing/goto-super.png)
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Go to super implementation">
<source src="/docs/java/java-editing/goto-super-implementation.mp4" type="video/mp4">
</video>
@ -73,7 +73,7 @@ You can also right-click in a function body and pick **Show Call Hierarchy**.
A Type Hierarchy view shows the inheritance relationships between Java Objects. You can right-click on a type and pick **Show Type Hierarchy**.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Type hierarchy">
<source src="/docs/java/java-editing/type-hierarchy.mp4" type="video/mp4">
</video>
@ -81,7 +81,7 @@ A Type Hierarchy view shows the inheritance relationships between Java Objects.
Folding regions allows you to fold or unfold code snippet to better view the source code.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Folding regions">
<source src="/docs/java/java-editing/folding-range.mp4" type="video/mp4">
</video>
@ -92,7 +92,7 @@ With [Smart Selection](https://code.visualstudio.com/updates/v1_33#_smart-select
* To expand the selection, use `kb(editor.action.smartSelect.expand)`.
* To shrink the selection, use `kb(editor.action.smartSelect.shrink)`.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Smart selections">
<source src="/docs/java/java-editing/smart-selection.mp4" type="video/mp4">
</video>
@ -123,13 +123,13 @@ To learn more about Spring Boot support with Visual Studio Code, read [Spring Bo
Editing code is also easy with IntelliSense for smart code completions and signature details. You can use code snippets as well as various code actions such as generating Getters/Setters and organizing imports to further boost your productivity.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Code editing">
<source src="/docs/java/java-editing/code-editing.mp4" type="video/mp4">
</video>
Java support in Visual Studio Code detects issues within your code automatically, and provides you with Quick Fix suggestions.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Quick fix suggestions">
<source src="/docs/java/java-editing/quick-fix.mp4" type="video/mp4">
</video>
@ -141,7 +141,7 @@ Code completion in Visual Studio Code for Java is provided by [Language Support
In addition, there's also AI-assisted IntelliSense called [IntelliCode](https://visualstudio.microsoft.com/services/intellicode/). It saves you time by putting what you're most likely to use at the top of your completion list. IntelliCode recommendations are based on thousands of open-source projects on GitHub each with over 100 stars, so it's trained on the most common usages from high-quality projects. When combined with the context of your code, the completion list is tailored to promote those practices. Here's IntelliCode for Java in action.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="IntelliSense code completion suggestions">
<source src="/docs/java/java-editing/intellicode.mp4" type="video/mp4">
</video>
@ -151,7 +151,7 @@ IntelliCode works well with popular Java libraries and frameworks like Java SE a
VS Code supports applying templates when you create a Java source file. 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:
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Create new file">
<source src="/docs/java/java-editing/create-new-file.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -36,7 +36,7 @@ To run the JavaFX application, you can open the **Maven** Explorer, expand `hell
> **Note**: Make sure you have installed the [Maven for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven) extension. If you cannot find the **Maven** explorer, open the Command Palette (`kb(workbench.action.showCommands)`) and then select the command **Explorer: Focus on Maven View**.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Run JavaFX application">
<source src="/docs/java/java-gui/run-javafx.mp4" type="video/mp4">
</video>
@ -48,7 +48,7 @@ More JavaFX project examples can be found in the [openjfx samples repository](ht
By default, the types from the Abstract Window Toolkit (AWT) are hidden. You may notice that code completions are not working when you are developing an AWT application. To enable completions, you can open the Command Palette (`kb(workbench.action.showCommands)`) and then select the command **Java: Help Center**. Go to the **Student** section and select **Enable AWT Development**.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Develop AWT application">
<source src="/docs/java/java-gui/enable-awt.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -17,7 +17,7 @@ In addition, there are also the [Checkstyle for Java](https://marketplace.visual
You can use **Format Document** command to format a Java file. If you didn't specify a formatter profile before, the Java file will be formatted using default settings.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls video="Format document">
<source src="/docs/java/java-linting/formatting.mp4" type="video/mp4">
</video>
@ -41,7 +41,7 @@ After setting the formatter profile, the **Format Document** command will use th
The [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) provides an editor to help users edit an existing formatter profile. You can open the editor with the command **Java: Open Java Formatter Settings with Preview**. In the editor, you can change the formatter settings and preview the effects. After saving the current editor, the changes will be saved to the formatter profile.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Editing formatter settings">
<source src="/docs/java/java-linting/formatting-editing.mp4" type="video/mp4">
</video>
@ -49,13 +49,13 @@ The [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemNam
When editing settings in the editor, you can preview the changes' effects in the right **Preview** panel.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Preview formatting effects">
<source src="/docs/java/java-linting/formatting-preview.mp4" type="video/mp4">
</video>
You can also undo and redo changes.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Undo and redo changes to formatting effects">
<source src="/docs/java/java-linting/formatting-undoredo.mp4" type="video/mp4">
</video>
@ -67,7 +67,7 @@ You can also undo and redo changes.
Issues are highlighted directly in the editor with hovers to provide detailed explanations.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Code analysis on the fly">
<source src="/docs/java/java-linting/sonarlint.mp4" type="video/mp4">
</video>
@ -77,7 +77,7 @@ Issues found in the opened file can also be reviewed through the Problems panel
For any issues detected, SonarLint provides full documentation about the rule that was violated, and the best coding practice it relates to. This allows you to understand why an issue is raised, and how to fix it.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Rule documentation and remediation guidance">
<source src="/docs/java/java-linting/sonarlint-description.mp4" type="video/mp4">
</video>
@ -85,7 +85,7 @@ For any issues detected, SonarLint provides full documentation about the rule th
By default, SonarLint provides a wide array of rules to detect bugs and vulnerabilities. More checks can be enabled through the **SonarLint Rules** view.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Enabling more quality and security rules">
<source src="/docs/java/java-linting/sonarlint-rules.mp4" type="video/mp4">
</video>
@ -97,19 +97,19 @@ With the [Checkstyle for Java](https://marketplace.visualstudio.com/items?itemNa
Set Checkstyle configuration file using the **Checkstyle: Set the Checkstyle Configuration File** command and selecting the Checkstyle file from the dropdown.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Set checkstyle configuration file command">
<source src="/docs/java/java-linting/checkstyle.mp4" type="video/mp4">
</video>
The [Checkstyle for Java](https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle) extension supports live linting.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Live linting">
<source src="/docs/java/java-linting/checkstyle-live-linting.mp4" type="video/mp4">
</video>
And batch check.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Batch check">
<source src="/docs/java/java-linting/checkstyle-batch.mp4" type="video/mp4">
</video>
@ -128,7 +128,7 @@ You can also trigger the command **Checkstyle: Set Checkstyle Configuration File
The command **Checkstyle: Set the Checkstyle Configuration** detects potential **Checkstyle** configuration files and lists them. You can also provide a configuration file by directly writing a URL in the input box.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Set checkstyle configuration">
<source src="/docs/java/java-linting/checkstyle-configuration.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -222,7 +222,7 @@ Clicking the language status item switches to standard mode.
When you edit Java source code in Visual Studio Code, the Java language server is building your workspace to provide you with the necessary language features. You can see the detailed build task status and watch what is happening behind the scene by clicking the language status item in the Status bar. You can also select the **check details** link when a notification shows the language server is opening Java projects to see the build task status.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Build status for the Java project">
<source src="/docs/java/java-project/java.build.status.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -83,7 +83,7 @@ List<String> fruits = Arrays.asList("apple", "lemon", "banana");
It can also be used to assign a parameter to a new field for unused parameter(s) in a constructor.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Assign a parameter to a new field">
<source src="/docs/java/java-refactoring/assign-to-field.mp4" type="video/mp4">
</video>
@ -192,7 +192,7 @@ public void order(String[] books) {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Convert to enhanced for loop">
<source src="/docs/java/java-refactoring/convert-for-loop.mp4" type="video/mp4">
</video>
@ -257,7 +257,7 @@ public void test() {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Convert to static import">
<source src="/docs/java/java-refactoring/convert-static-imports.mp4" type="video/mp4">
</video>
@ -323,13 +323,13 @@ class Square {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Extract to field">
<source src="/docs/java/java-refactoring/extract-field.mp4" type="video/mp4">
</video>
When selecting a variable declaration, convert the variable to field.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Convert the variable to field">
<source src="/docs/java/java-refactoring/convert-field.mp4" type="video/mp4">
</video>
@ -365,7 +365,7 @@ private int getArea(int height, int width) {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Extract to method">
<source src="/docs/java/java-refactoring/refactor.mp4" type="video/mp4">
</video>
@ -400,13 +400,13 @@ public void method() {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Extract to local variable">
<source src="/docs/java/java-refactoring/extract-local-variable.mp4" type="video/mp4">
</video>
After the extraction, you can also perform a rename in the same transaction.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Rename local variable after extraction">
<source src="/docs/java/java-refactoring/extract-rename.mp4" type="video/mp4">
</video>
@ -505,7 +505,7 @@ public void method() {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Replace calls to the method with method's body">
<source src="/docs/java/java-refactoring/inline.mp4" type="video/mp4">
</video>
@ -563,7 +563,7 @@ public void method(int value) {
}
```
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Invert local variable">
<source src="/docs/java/java-refactoring/invert-variable.mp4" type="video/mp4">
</video>
@ -613,19 +613,19 @@ public class Office {
Move refactoring on a static method if it is used more in another class than in its own class.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Refactoring on a static method">
<source src="/docs/java/java-refactoring/move-static-method.mp4" type="video/mp4">
</video>
Move a class to another package. Currently, move refactoring is not supported from the File Explorer.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Move a class to another package">
<source src="/docs/java/java-refactoring/move-class.mp4" type="video/mp4">
</video>
Move an inner class to new a new file.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Move an inner class to a new File">
<source src="/docs/java/java-refactoring/move-inner-type.mp4" type="video/mp4">
</video>
@ -665,7 +665,7 @@ public void myMethod() {
The shortcut to invoke the Rename refactoring is `kb(editor.action.rename)`. When you invoke the shortcut on an identifier in the editor, a small box displays within the editor itself where you can change the identifier name. When you press `kbstyle(Enter)`, all references to that identifier are changed too.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Shortcut to invoke the Rename refactoring">
<source src="/docs/java/java-refactoring/rename.mp4" type="video/mp4">
</video>
@ -723,7 +723,7 @@ Source Actions could be used to generate common code structures and recurring el
Add a constructor for the class.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate constructors">
<source src="/docs/java/java-refactoring/generate-constructor.mp4" type="video/mp4">
</video>
@ -731,7 +731,7 @@ Add a constructor for the class.
Generate delegate methods
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate delegate methods">
<source src="/docs/java/java-refactoring/generate-delegate-methods.mp4" type="video/mp4">
</video>
@ -739,7 +739,7 @@ Generate delegate methods
With this Source Action, all the candidates are presented to you with a checklist. You can then decide what to override or implement.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Override/implement methods">
<source src="/docs/java/java-refactoring/override-implement-methods.mp4" type="video/mp4">
</video>
@ -747,7 +747,7 @@ With this Source Action, all the candidates are presented to you with a checklis
You can use this Source Action to clean up your imports. It can also deal with ambiguous imports, in that case, a dropdown list will be presented for you to pick the right one. The code line with the unresolved type is also presented to you to help you decide.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Organize imports">
<source src="/docs/java/java-refactoring/resolve-ambiguous-imports.mp4" type="video/mp4">
</video>
@ -755,7 +755,7 @@ You can use this Source Action to clean up your imports. It can also deal with a
You can bulk generate getters and setters for all new member variables. If the class has more than one field, the Source Action will prompt a Quick Pick for you to select the target fields to use to generate the accessor methods.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate getters and setters">
<source src="/docs/java/java-refactoring/advancedgettersetter.mp4" type="video/mp4">
</video>
@ -768,7 +768,7 @@ There are two options for you to customize the generated code:
- If you use Java 7+, you can set `java.codeGeneration.hashCodeEquals.useJava7Objects` to `true` to generate shorter code that calls `Objects.hash` and `Objects.equals`.
- You can also set `java.codeGeneration.hashCodeEquals.useInstanceof` to `true` to use `instanceOf` operator to check the object types instead of calling `Object.getClass()`.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate hashCode() and equals()">
<source src="/docs/java/java-refactoring/generate-hashcode-equals.mp4" type="video/mp4">
</video>
@ -776,7 +776,7 @@ There are two options for you to customize the generated code:
There is a new Source Action to generate the `toString()` method. Customization is possible with a check list of all the member variables.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate toString()">
<source src="/docs/java/java-refactoring/generate-tostring.mp4" type="video/mp4">
</video>
@ -816,7 +816,7 @@ public class Clazz {
This Quick Fix helps you fix non-accessible reference.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Fix non-accessible references">
<source src="/docs/java/java-refactoring/fix-non-access-reference.mp4" type="video/mp4">
</video>
@ -824,7 +824,7 @@ This Quick Fix helps you fix non-accessible reference.
When your package name doesn't match the folder name, you have the options to either change the package name in your source code, or move the folder in the file system (even when the destination folder doesn't exist yet).
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Create non-existing package">
<source src="/docs/java/java-refactoring/create-non-exist-package.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -44,7 +44,7 @@ To install, launch VS Code and from the Extensions view (`kb(workbench.view.exte
Once you have the extension installed, open the **Command Palette** (`kb(workbench.action.showCommands)`) and type `Spring Initializr` to start generating a Maven or Gradle project and then follow the wizard.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls video="Create the project">
<source src="/docs/java/java-spring-boot/spring-initializr.mp4" type="video/mp4">
</video>
@ -54,7 +54,7 @@ The [Spring Initializr](https://marketplace.visualstudio.com/items?itemName=vscj
Navigate to your `pom.xml` file and right-click to select **Add starters...**. A dropdown will show the dependencies you already have beginning with a `√` . You can search for other dependencies you want to add to your project. Or you can click on the existing dependencies to remove them.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Edit the project">
<source src="/docs/java/java-spring-boot/spring-initializr-add-starters.mp4" type="video/mp4">
</video>
@ -76,7 +76,7 @@ To learn how to use these features, you can visit this [detailed usage guide](ht
Below is an example showing live application information.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Live application information and metrics">
<source src="/docs/java/java-spring-boot/spring-live-info.mp4" type="video/mp4">
</video>
@ -84,7 +84,7 @@ Below is an example showing live application information.
In addition to using `kb(workbench.action.debug.start)` to run your application, there's the [Spring Boot Dashboard](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-spring-boot-dashboard) extension, which lets you view and manage all available Spring Boot projects in your workspace as well as quickly start, stop, or debug your project.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Run the Spring Boot application from Spring Boot dashboard">
<source src="/docs/java/java-spring-boot/spring-dashboard.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -44,7 +44,7 @@ The [Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=v
Starting with Test Runner for Java version 0.34.0, you can enable a test framework for your unmanaged folder project (a project without any build tools) with just a few steps in the **Testing** Explorer:
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Enable testing and adding test framework JARs to your project">
<source src="/docs/java/java-testing/enable-tests.mp4" type="video/mp4">
</video>
@ -139,7 +139,7 @@ If your project does not use any build tools, you can enable TestNG via the [Tes
The Test Runner for Java extension will generate shortcuts (the green play button) on the left side of the class and method definition. To run the target test cases, select the green play button. You can also right-click on it to see more options.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Run/debug test cases">
<source src="/docs/java/java-testing/gutter-icon.mp4" type="video/mp4">
</video>
@ -147,7 +147,7 @@ The Test Runner for Java extension will generate shortcuts (the green play butto
The Testing Explorer is a tree view to show all the test cases in your workspace. You can select the beaker button on the left-side Activity bar of Visual Studio Code to open it. You can also run/debug your test cases and view their test results from there.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Testing Explorer">
<source src="/docs/java/java-testing/test-explorer.mp4" type="video/mp4">
</video>
@ -179,7 +179,7 @@ More details can be found on the [vscode-java-test Wiki](https://github.com/Micr
After running/debugging the test cases, the state of the related test items will be updated in both editor decorations and the Testing Explorer.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="View test results">
<source src="/docs/java/java-testing/test-result.mp4" type="video/mp4">
</video>
@ -191,13 +191,13 @@ The extension provides features to help you scaffold test cases. You can find th
If you trigger this source action from your main source code (test subject), you will be asked the test class's fully qualified name and the methods you want to test. The extension will then generate the test code for you:
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate tests">
<source src="/docs/java/java-testing/generate-tests-from-main.mp4" type="video/mp4">
</video>
If you trigger the source action from your test source code, you will be asked which kinds of test methods you want to add. Including the lifecycle methods and the test method:
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Generate tests from test">
<source src="/docs/java/java-testing/generate-tests-from-test.mp4" type="video/mp4">
</video>
@ -205,7 +205,7 @@ If you trigger the source action from your test source code, you will be asked w
The extension provides features to help you navigate between your tests and test subjects. If your source code is contained in `src/main/java` or `src/test/java`, you can find the entry named **Go to Test** or **Go to Test Subject** in the editor context menu:
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Test navigation">
<source src="/docs/java/java-testing/test-navigation.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -22,7 +22,7 @@ If you run into any issues when using the features below, you can contact us by
The [Community Server Connectors](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-community-server-connector) extension is published by Red Hat. It provides a Remote Server Protocol-based server connector, which can start, stop, publish to, and otherwise control community runtimes and servers like [Apache Felix](https://felix.apache.org/documentation/index.html), [Karaf](https://karaf.apache.org/), and [Tomcat](https://tomcat.apache.org/).
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Community server connectors">
<source src="/docs/java/java-tomcat-jetty/server-connector.mp4" type="video/mp4">
</video>

Просмотреть файл

@ -79,7 +79,7 @@ If you have never installed a JDK before and need to install one, we recommend y
Create a folder for your Java program and open the folder with VS Code. Then in VS Code, create a new file and save it with the name `Hello.java`. When you open that file, the Java Language Server automatically starts loading, and you should see a language status item with a loading icon on the right side of the Status Bar showing the language status is busy. After it finishes loading, you can hover on the language status item and find the loading process has been finished successfully. You can also choose to pin the status item in the status bar.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Creating a source code file">
<source src="/docs/java/java-tutorial/JavaHelloWorld.Standalone.mp4" type="video/mp4">
</video>
@ -89,7 +89,7 @@ VS Code will also try to figure out the correct package for the new type and fil
You can also create a Java project using the **Java: Create Java Project** command. Bring up the **Command Palette** (`kb(workbench.action.showCommands)`) and then type `java` to search for this command. After selecting the command, you will be prompted for the location and name of the project. You can also choose your build tool from this command.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Create Java Project">
<source src="/docs/java/java-tutorial/JavaHelloWorld.Project.mp4" type="video/mp4">
</video>
@ -99,7 +99,7 @@ Visual Studio Code also supports more complex Java projects — see [Project Man
You can use code snippets to scaffold your classes and methods. VS Code also provides IntelliSense for code completion, and various refactor methods.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Editing source code">
<source src="/docs/java/java-tutorial/edit-code.mp4" type="video/mp4">
</video>
@ -109,7 +109,7 @@ To learn more about editing Java, see [Java Editing](/docs/java/java-editing.md)
To run and debug Java code, set a breakpoint, then either press `kb(workbench.action.debug.start)` on your keyboard or use the **Run** > **Start Debugging** menu item. You can also use the **Run|Debug** CodeLens option in the editor. After the code compiles, you can see all your variables and threads in the **Run and Debug** view.
<video autoplay loop muted playsinline controls>
<video autoplay loop muted playsinline controls title="Running and debugging your program">
<source src="/docs/java/java-tutorial/run-debug.mp4" type="video/mp4">
</video>