pebble-intellij icon indicating copy to clipboard operation
pebble-intellij copied to clipboard

Autocompletion does not work on variables defined using the `set` tag

Open syzsh opened this issue 1 year ago • 1 comments

版本号: 0.9.1 问题:

{# @pebvariable name="foo" type="com.github.syzsh.test.TestPebble.Foo" #}

{% set bar=foo.bar %} {# 这里是正常的 #}

{{ bar.str }} {# 代码完成不起作用 #}

{# @pebvariable name="bar" type="com.github.syzsh.test.TestPebble.Bar" #}
{{ bar.str }} {# 加上了pebvariable注释, 仍然不起作用 #}

{{ foo.bar.str }} {# 这样写是可以的 #}


{#
class Foo {
    public Bar bar;

    public Foo(Bar bar) {
        this.bar = bar;
    }
}

class Bar {
    public String str;

    public Bar(String str) {
        this.str = str;
    }
}
#}

请求协助~ 多谢~

syzsh avatar Jan 31 '23 11:01 syzsh

Translation: autocompletion does not work on variables defined using the set tag:

{% set bar=foo.bar %} {# new variable defined here #}

{{ bar.str }} {# no autocompletion #}

bjansen avatar Jan 31 '23 16:01 bjansen