Support string interpolations for java

Hi!

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 https://gist.github.com/KhadanovichSergey/7baf4c5eb432e6be5a3b186b2e77ef8c. 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.