Support string interpolations for java


I'm trying to support string interpolations in java. You know, as in other good languages :)

For example,

void method() {
String name = "Alex";
System.out.println(s("Hello, ${name}"));

I implemented simple language injector And it works :) But, I caught some strange behaviour.

As you can see, I used static variable, local variable and method argument in the expression. Go to declaration, find usage and syntax highlighting work for static variable and method argument. Great! For local variable `name` highlighting does not work, but Go to declaration and find usages work.

Am I doing something wrong or it is a intellij bug? Can you help me?

Please sign in to leave a comment.