hi, i am trying to create a plugin that would modi...
# intellij-plugins
s
hi, i am trying to create a plugin that would modify primary constructor parameters of a class or data class (group vars and vals together). I am however stuck in how to proceed. By using the intellij PSI structure viewer, i can see the format and structure of the constructor and by using
classOrObject.getPrimaryConstructorParameterList()?.parameters
i can see the parameters. I am not sure how to go about actually doing the modification though, It doesn’t seem possible to directly modify the class after accessing the parameters. Could some one help nudge me in the right direction?
m
Take a look at some existing quickfix sources. Basically you create new PSI from string and replace the old one.
🙏 1