Inject a language

Language injections let you work with pieces of code in other languages embedded in your code.

Injecting a language such as HTML, CSS, XML, RegExp, and so on into a string literal gives you code assistance for editing that literal including code completion and validation (such as RegExp).

Use ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) to inject a language or reference.


Related Resources

Pattern Matching for Switch
Pattern Matching for Switch
Available in preview from Java 17
Generate constructors and accessor methods
Generate constructors and accessor methods
Quickly generate common code constructs such as Constructors, Getters and Setters
Expand and Collapse Code
Expand and Collapse Code
Quickly view specific parts of a class by expanding or collapsing code