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 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,


Hi Markus,

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


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.

After fixing code style and formtatting differences, Simple.bnf ist the only difference besides the timestamp in the generated 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
>   psiImplUtilClass="com.simpleplugin.psi.impl.SimplePsiImplUtil"
< 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]}


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.


Please sign in to leave a comment.