mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
IDEA-333006 Language injection in String templates GitOrigin-RevId: 6b6bec62bd709cd0419139d8a78925ee3d59e249
17 lines
460 B
Java
17 lines
460 B
Java
// "Add on-demand static import for 'java.lang.System'" "true-preview"
|
|
import org.intellij.lang.annotations.Language;
|
|
|
|
public class Hello {
|
|
void test(String name, String message) {
|
|
@Language("JAVA")
|
|
String s = STR."""
|
|
import static java.lang.System.*;
|
|
|
|
class \{name} {
|
|
void main() {
|
|
out.println("\{message}");
|
|
}
|
|
}""";
|
|
}
|
|
}
|