intellij-postfix-templates icon indicating copy to clipboard operation
intellij-postfix-templates copied to clipboard

"expr" Cannot be referenced directly in an expression

Open mzzsfy opened this issue 4 years ago • 6 comments

I want to write a template about "AopContext.currentProxy", but I can't do it

template: image

result: image

As you can see, if I didn't quote $expr$ separately, "expr" in the template would not work

mzzsfy avatar Dec 21 '19 08:12 mzzsfy

If I have any incorrect use, please point out

mzzsfy avatar Dec 21 '19 08:12 mzzsfy

This is the test result with 'this' observation keyword image

mzzsfy avatar Dec 21 '19 08:12 mzzsfy

Your syntax and use is correct. The problem is the plugin does not identify "expr" as variable if it's only used in the script part of variables. I haven't thought of this option yet. So thanks for reporting this bug.

xylo avatar Dec 21 '19 08:12 xylo

Ok, hope to fix this soon,thank you

mzzsfy avatar Dec 21 '19 09:12 mzzsfy

Unfortunately it seems to be more complicated as expected. First I thought that the problem is related to my plugin code, but seemingly it's not. Instead it seems that the postfix completion is not capable of using variables in variable expressions when these variables have not been used as placeholders somewhere. :(

xylo avatar Dec 21 '19 13:12 xylo

It looks like you are preparing a brand new version? Is there any progress on this feature?

mzzsfy avatar May 16 '22 08:05 mzzsfy