Thursday, April 25, 2024
HomeProgrammingLanguage Injection IntelliJ. IntelliJ has the flexibility to deal with a… |...

Language Injection IntelliJ. IntelliJ has the flexibility to deal with a… | by David Ford


The prepareStatement technique (from java.sql.Connection) takes 1 argument of sort String. However extra particularly, one argument of sort SQL String. And that argument won’t ever be something apart from SQL. So, we are able to inform IntelliJ that.

Steps

Navigate to Preferences | Editor | Language Injections

+ kotlinParameter().
ofFunction(0,kotlinFunction().
withName("prepareStatement").
withReceiver("java.sql.Connection"))

For those who can’t coax IntelliJ to determine the language based mostly on context, use an annotation, like this:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments