psi_cookbook.md: JavaLibraryUtil

This commit is contained in:
Yann Cébron 2023-04-25 16:10:42 +02:00
parent 0f76642764
commit d6e4a8e848
2 changed files with 15 additions and 4 deletions

View File

@ -2,7 +2,6 @@
# Notable Changes in IntelliJ Platform and Plugins API 2023.*
<link-summary>List of known Notable API Changes in 2023.*</link-summary>
_Early Access Program_ (EAP) releases of upcoming versions are available [here](https://eap.jetbrains.com).
@ -14,6 +13,9 @@ _Early Access Program_ (EAP) releases of upcoming versions are available [here](
### IntelliJ Platform 2023.2
Check presence of JVM library
: Use [dedicated API](psi_cookbook.md#how-do-i-check-the-presence-of-a-jvm-library) to check presence via class FQN or Maven coordinates.
## 2023.1
### IntelliJ Platform 2023.1

View File

@ -68,3 +68,12 @@ or
### How do I find the methods overriding a specific method?
[`OverridingMethodsSearch.search()`](%gh-ic%/java/java-indexing-api/src/com/intellij/psi/search/searches/OverridingMethodsSearch.java)
### How do I check the presence of a JVM library?
_2023.2_
Use dedicated (and heavily cached) methods from [`JavaLibraryUtil`](%gh-ic-master%/java/openapi/src/com/intellij/java/library/JavaLibraryUtil.java):
- `hasLibraryClass()` to check presence via known library class FQN
- `hasLibraryJar()` using Maven coordinates (for example, `io.micronaut:micronaut-core`).