How to create PsiElements for insertion into JSP page?
I am writing an inspection/quick fix that works in JSP pages. I've got the inspection working, but I can't figure out how to create PsiStatements for insertion into the page. It seems like I need to create instances of JSPCodeBlock, JSPTemplateStatement and JSPText but it doesn't look like I can do that with the PsiElementFactory.
I have a reference to the following JspCodeBlock from my inspection:
]]>
and I need to add the following after the <dsp:form ...> tag:
"/> ]]>
Thanks!
Todd
Edited by: Todd Breiholz on Jun 4, 2008 10:33 PM - Changed title to indicate question
Please sign in to leave a comment.
Todd Breiholz wrote:
Create a light jsp file (createFileFromText) with the tag you need, then
find it in file's PSI and add this tag to <dsp:form> via PsiElement.add*.
Works perfect!
Thanks, Peter