https://github.com/sirywell/handlehints
An IntelliJ plugin providing inspections and visual enhancements for the Java MethodHandle, VarHandle, and Foreign Function & Memory APIs
https://github.com/sirywell/handlehints
intellij intellij-plugin java kotlin
Last synced: over 1 year ago
JSON representation
An IntelliJ plugin providing inspections and visual enhancements for the Java MethodHandle, VarHandle, and Foreign Function & Memory APIs
- Host: GitHub
- URL: https://github.com/sirywell/handlehints
- Owner: SirYwell
- License: mit
- Created: 2022-10-15T12:51:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T08:32:34.000Z (over 1 year ago)
- Last Synced: 2024-10-25T16:39:22.826Z (over 1 year ago)
- Topics: intellij, intellij-plugin, java, kotlin
- Language: Kotlin
- Homepage:
- Size: 1.87 MB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HandleHints

[](https://plugins.jetbrains.com/plugin/24637)
[](https://plugins.jetbrains.com/plugin/24637)
This IntelliJ plugin helps when working with `MethodHandle`s, `VarHandle`s,
and the [Foreign Function & Memory API](https://openjdk.org/jeps/454) by contributing type hints,
inspections, and enhanced auto completions.
### Features
- Dataflow-sensitive type analysis
- Support for methods from the `MethodHandles` class
- Support for methods from the `MethodHandles.Lookup` class
- Support for methods from the `MethodType` class
- Support for methods from the `MethodHandle` class
- Support for methods from `MemoryLayout` classes (type tracking for memory layouts)
- Support for methods from the `PathElement` class
- Precise type tracking for parameters and return types separately
- Inspections for supported creation/transformation/combination methods
- Inspections for `invoke` and `invokeExact` arguments and return type checks
- Inspections for invalid layout paths
- Inspections for misaligned struct layouts, with quick fixes for padding/alignment adjustment
- Inlay type hints
## Installation
- Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "HandleHints" >
Install Plugin
- Manually:
Download the [latest release](https://github.com/SirYwell/HandleHints/releases/latest) and install it manually using
Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
---
Plugin based on the [IntelliJ Platform Plugin Template][template].
[template]: https://github.com/JetBrains/intellij-platform-plugin-template