How to create PsiClass for Record from 14 jdk ?
已回答
I trying to make plugin for static code analysis by JetBrains api , by inspections.
Tell me please how to create PsiClass for Record from 14 jdk ?
Documentation tells use PsiFileFactory , but :
Firstly - it is abstract class , what implementation do I need?
Secondly , how to create exactly record from 14 jdk ?
请先登录再写评论。
com.intellij.psi.PsiElementFactory#createRecord
com.intellij.psi.PsiJavaParserFacade#createRecordHeaderFromText
You must obtain instance of PsiElementFactory via com.intellij.psi.PsiElementFactory#getInstance
And how to create record with parameters ?
The returned PsiClass from PsiElementFactory can be modified afterwards programmatically.