language injection config <ignore-pattern> not working in kotlin file

已回答

Inject SQL language in kotlin file, <ignore-pattern> is not working, but java file working correctly.

<injection language="SQL" injector-id="java">
        <display-name>Baki (com.github.chengyuxing.sql.Baki)</display-name>
        <ignore-pattern><![CDATA[^&[\s\S]+]]></ignore-pattern>
        <place><![CDATA[
            psiParameter()
                    .ofMethod(0, psiMethod().withName("query")
                            .withParameters("java.lang.String")
                            .definedInClass("com.github.chengyuxing.sql.Baki"))
            ]]></place>

If starts with ‘&’, it should not be inject SQL language.

how can i fix this?

0

value pattern also not working in kotlin, why?

0

You have defined injector-id="java", please try with (additional config) injector-id="kotlin"

0

I already tried that, still no effect, and check 2nd image(injector-id=kotlin, Settings→Language Injections) please.

<injection language="SQL" injector-id="kotlin">
        <display-name>Baki (com.github.chengyuxing.sql.Baki)</display-name>
        <ignore-pattern><![CDATA[^&[\s\S]+]]></ignore-pattern>
        <place><![CDATA[
            kotlinParameter()
                    .ofFunction(0, kotlinFunction().withName("query")
                            .definedInClass("com.github.chengyuxing.sql.Baki"))
            ]]></place>
    </injection>
0

Could you please file an issue here https://youtrack.jetbrains.com/issues/KTIJ and provide sources to your plugin if possible? Thanks.

0

Thanks, submitted.

0

请先登录再写评论。