implementing language plugin Follow
hi,
I am implementing a language plugin and following the Java script example provided at http://www.jetbrains.com/idea/plugins/developing_custom_language_plugins.html. I have got the Lexer working and now I am implementing the ParserDefinition. I am stuck witht the creation of my language file type.
My issue comes when I follow the JS example code at http://www.jetbrains.com/idea/pluginsamples/5.0/javascript/com/intellij/lang/javascript/psi/JSFile.java.html . The JSFile class is only a 72 lines long with 2 constructors and 4 methods. Trying to do the same I need to implement some 40 methods if I want to implement my own PsiFile.
Has the API changed since this example was written? Or should i not "extends PsiFileBase implements PsiElement". I am using the latest RC 3 Build 5755.
Florian
Please sign in to leave a comment.
i think i have found part of my problem:
Eventhough i ahve added idea.jar into the module dependencies IDEA seems unable to resolve PsiFileImpl which is what PsiFileBase extends.
I am not sure why this is. If i pres ctrl-N I can clearly find PsiFileImpl.
Florian Hehlen
You should not add idea.jar as a module library, add it to your IDEA SDK classpath instead.
Hello Florian,
FH> i think i have found part of my problem:
FH>
FH> Eventhough i ahve added idea.jar into the module dependencies IDEA
FH> seems unable to resolve PsiFileImpl which is what PsiFileBase
FH> extends.
You need to add idea.jar to the list of libraries in the IDEA JDK, not to
your module dependencies.
--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"
yup that was the problem... thanks