[13206] ERROR - .psi.impl.DocumentCommitThread with simple language plugin (only filetype registered)

Hi,

I started to create a language plugin (with IDEA 12 Ultimate) and have currently done nothing more than registering the filetype in plugin.xml

  <extensions defaultExtensionNs="com.intellij">       <fileTypeFactory implementation="org.ipcu.mathematicaPlugin.MathematicaFileTypeFactory"/>   </extensions>



The implementation follows almost exactly the Properties example which means I have a class MathematicaFileType extending LanguageFileType and a MathematicaLanguage class which does nothing than calling the constructor of the super-class. When I try my plugin, I see the icon for the for my file-type but when I edit the file the following exception is constantly thrown:

[  13206]  ERROR - .psi.impl.DocumentCommitThread - View provider com.intellij.psi.SingleRootFileViewProvider@2a3fcb7 refused to parse text with Language: 
TEXT; base: Language: Mathematica; copy: Language: Mathematica; fileType: org.ipcu.mathematicaPlugin.MathematicaFileType@4af3de46 

In the sandbox-editor I'm not able to insert line-feeds. The exception is not thrown when I open the file, but in the moment when I try to edit it.


  1. What am I missing here? Can someone give me a hint and more importantly, can someone provide some tips how I could have debuged this?
  2. Is there a language plugin which is completely up-to-date with latest version of the openapi and which can be used to understand the details of custom language plugins? Are there any further resources beside the "Developing Custom Language Plugins for IntelliJ IDEA" article which can be used to get started?


Cheers
Patrick

1 comment
Comment actions Permalink

OK, it seems the jflex-plugin svn version is an up-to-date language plugin which is rather small and can be used to look at some details. When I understood this right, then I need to implement a

<lang.parserDefinition language="..." implementationClass="..."/>



extension to get rid of the error. It would still be nice when someone shares some tips.
0

Please sign in to leave a comment.