How to create PSI elements from text, for custom language?

I notice that the Javascript plugin uses some hack by creating a new
temporary file, then inserting text into it, for each new PSI element.
Is this the recommended way?

1 comment
Comment actions Permalink

Hello Keith,

KL> I notice that the Javascript plugin uses some hack by creating a new
KL> temporary file, then inserting text into it, for each new PSI
KL> element. Is this the recommended way?

Yes, this is in fact the easiest way to create new PSI elements (although
it does look hackish).

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.