[note] Configure commonly used Static Members in VScode

Note: This page is an AI-generated (gpt-5-mini-2025-08-07) translation from Traditional Chinese and may contain minor inaccuracies.

๐Ÿ“Œ Introduction

Configure commonly used Static Members in VSCode

๐Ÿš€ How to configure in VScode

Open Settings and search for Java Completion, find Favoriate Static Members and click Edit in setting.json. Add your frequently used Member entries, like the following.

1
2
3
4
5
6
7
8
9
10
11
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*"
]

image

๐Ÿ”— References

[note] Configure commonly used Static Members in VScode

https://hsiangjenli.github.io/blog/note-vscode-static-members.en/

Author

Hsiang-Jen Li

Posted on

2026-02-26

Updated on

2026-02-26

Licensed under