Need help for "Custom Language Support" example

Hi, I am new to IDEA plugin development and try to learn from exsting examples.
Currently, I am working through the "Custom Language Support" example from the wiki http://confluence.jetbrains.com/display/IntelliJIDEA/Custom+Language+Support and I am stuck in the chapter "Lexer and Parser Definition".
When I try to run the plugin and open the test.sample file (last step in this chapter), I get the "refused to parse text with Language: TEXT" problem that was already discussed here in a few threads.

I think I did erverything like it was described in the example, at least I did not miss to register the parser definition, so the solutione stated in these theads does not apply to my case. All the steps befre succeeded, like associationg the icon with the .sample file tpe.

Which common errors should I check ?

Thanks and Regards,
Markus

3 comments

Hi Markus,

Did you compare your code with the sample shared in GitHub?

0

Not before your reply ...

But now. :-)

The main difference I see (besides files that do not yet exist in my version due to the early stage) is in Simple.bnf. But it looks more like something from later chapters, too.


Edit:
After fixing code style and formtatting differences, Simple.bnf ist the only difference besides the timestamp in the generated SimpleLexer.java and the missing files (from later chapters).

This is the diff:

diff -rw SimplePlugin/src/com/simpleplugin/Simple.bnf SimplePlugin.from-git/src/com/simpleplugin/Simple.bnf
14a15,16
>
>   psiImplUtilClass="com.simpleplugin.psi.impl.SimplePsiImplUtil"
21c23,24
< property ::= (KEY? SEPARATOR VALUE?) | KEY
---
> property ::= (KEY? SEPARATOR VALUE?) | KEY {mixin="com.simpleplugin.psi.impl.SimpleNamedElementImpl"
>    implements="com.simpleplugin.psi.SimpleNamedElement" methods=[getKey  getValue getName setName getNameIdentifier getPresentation]}

0

OK, there was a problem with the plugin sandbox:

After also being unable to run the complete sample project cloned from git, it looked like it was a problem with my system setup. Clearing the sandbox completely helped.

0

Please sign in to leave a comment.