IDEA Plugin Dev Only Works In Debug Mode But Not Once Deployed


Im starting to create a new plugin for a custom language.

I have followed the tutorial pages and when i hit build, it opens a new instance of IDEA where my plugin is working.
If I then prepare the plugin for deployment and load the .jar file into my own new instance of IDEA, the plugin loads but my new language is not available.

Any ideas why this may be?

I have the <idea-version since-build> set to the latest version

I also have the

exposed to allow the plugin to work in pycharm for instance.
No matter what I do it just does not work once its deployed
Any ideas or pointers?


why do you think that your plugin is loaded? Is it shown in File | Settings | Plugins with the proper version?
And how do you create 'jar' file of the plugin?

Nikolay Chashnikov
"Develop with pleasure!"


Hey Nikolay,
Thanks for getting back to me.

So here is a more depth explaination.

I have taken the simplePlugin example and have the source code from github loaded in Intellij Idea 14.

If I go to Build>Make Project the plugin compiles with no issues.
If I click on the Run>Run and select the standard 'Plugin' configuration this launches a new instance of Intellij Idea 14.
Where if I create a new file of .simple file type, it automatically gets detected and shows the little icon as expected.

All good so far and pretty straight forwards.

If I then do Build>Make Project
and then Build>Prepare Plugin Module 'Simple Plugin' For Deployment

this also completes and I end up with a SimplePlugin.jar file.

If I then close everything down and open a new instance of either Intellij Idea 14 or PyCharm4.5.
Go to the settings and install a plugin from local disk.

The simplePlugin then shows up in the list of plugins showing as loaded, when i hit apply the application asks for a restart.

I hit restart and the application (either Intellij 14 or Pycharm, both do the same)
reloads. If I go back to the plugin menu, the plugin is still showing as loaded and no issues.

However if I now create a file with extension .simple the application asks me to select which fileType to associate it with, the .simple file type is not available.

If i close this and in the settings look at which FileTypes are registered the .simple extension is not available.
If i close this and run in debug mode, it all works again without changing a single line of code.

So i have the situation, where in debug via the run configuration it all works, but when i deploy it and load the .jar file it loads with no erorrs but just does not work.

Im on Mac, latest os using the latest versions of both Idea and PyCharm if that helps




Hmm, it's strange. Could you please check that the proper version of plugin.xml is packed to META-INF in SimplePlugin.jar?

Nikolay Chashnikov
"Develop with pleasure!"


Yeah its strage all right, its driving me crazy! :)

This is the contents of the .jar file plugin.xml

<idea-plugin version="2">




  <vendor email="" url="">YourCompany</vendor>


      Enter short description for your plugin here.<br>

      <small>most HTML tags may be used</small>



      Add change notes here.<br>

      <small>most HTML tags may be used</small>



  <!-- please see for description -->

  <idea-version since-build="145.0"/>

  <!-- please see

       on how to target different products -->



    <!-- Add your application components here -->



    <!-- Add your project components here -->



    <!-- Add your actions here -->


  <extensions defaultExtensionNs="com.intellij">

    <!-- Add your extensions here -->

      <fileTypeFactory implementation="com.simpleplugin.SimpleFileTypeFactory"/>

      <lang.parserDefinition language="Simple" implementationClass="com.simpleplugin.SimpleParserDefinition"/>

      <lang.syntaxHighlighterFactory key="Simple" implementationClass="com.simpleplugin.SimpleSyntaxHighlighterFactory"/>

      <colorSettingsPage implementation="com.simpleplugin.SimpleColorSettingsPage"/>

      <annotator language="JAVA" implementationClass="com.simpleplugin.SimpleAnnotator"/>

      <codeInsight.lineMarkerProvider language="JAVA" implementationClass="com.simpleplugin.SimpleLineMarkerProvider"/>

      <completion.contributor language="Simple" implementationClass="com.simpleplugin.SimpleCompletionContributor"/>

      <psi.referenceContributor implementation="com.simpleplugin.SimpleReferenceContributor"/>

      <lang.findUsagesProvider language="Simple" implementationClass="com.simpleplugin.SimpleFindUsagesProvider"/>

      <lang.refactoringSupport language="Simple" implementationClass="com.simpleplugin.SimpleRefactoringSupportProvider"/>

      <lang.foldingBuilder language="JAVA" implementationClass="com.simpleplugin.SimpleFoldingBuilder"/>

      <gotoSymbolContributor implementation="com.simpleplugin.SimpleChooseByNameContributor"/>

      <lang.psiStructureViewFactory language="Simple" implementationClass="com.simpleplugin.SimpleStructureViewFactory"/>

      <lang.formatter language="Simple" implementationClass="com.simpleplugin.SimpleFormattingModelBuilder"/>

      <codeStyleSettingsProvider implementation="com.simpleplugin.SimpleCodeStyleSettingsProvider"/>

      <langCodeStyleSettingsProvider implementation="com.simpleplugin.SimpleLanguageCodeStyleSettingsProvider"/>

      <lang.commenter language="Simple" implementationClass="com.simpleplugin.SimpleCommenter"/>




Please check that you don't have other copies of the plugin in idea.config.path/plugins directory.

Also you can try to debug the problem: run the IDE with debug parameter, connect to it from IDEA, put a breakpoint in
FileTypeManagerImpl#initStandardFileTypes method and check whether your implementation is returned from
FileTypeFactory.FILE_TYPE_FACTORY_EP.getExtensions() call. Also you can call PluginManagerCore.getPlugins() and find your plugin in the result to
check whether the plugin is actually loaded from the correct JAR file.

Nikolay Chashnikov
"Develop with pleasure!"



I ensured that there were no older versions of the plugin loaded, or on any of the config paths.
Also tested this on a clean install on a new machine and It still does not work.

So I went back to stage one as I still cant get this working.

I decided to checkout the SimplePlugin

Again, if I run the debug build from within idea everything seems to work
This compiles fine, and in Pycharm 4.5 when I load it I get the following error.

Any Ideas, as given that even the example code direct from git hub errors, im struggling here..

com/simpleplugin/SimpleReferenceContributor : Unsupported major.minor version 52.0 [Plugin:]
com.intellij.diagnostic.PluginException: com/simpleplugin/SimpleReferenceContributor : Unsupported major.minor version 52.0 [Plugin:]
 at java.lang.ClassLoader.loadClass(
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(
 at com.intellij.openapi.extensions.AbstractExtensionPointBean.findClass(
 at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(
 at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.instantiateExtension(
 at com.intellij.psi.impl.source.resolve.reference.PsiReferenceContributorEP.access$000(
 at com.intellij.psi.impl.source.resolve.reference.PsiReferenceContributorEP$1.compute(
 at com.intellij.psi.impl.source.resolve.reference.PsiReferenceContributorEP$1.compute(
 at com.intellij.openapi.util.NotNullLazyValue.getValue(
 at com.intellij.psi.impl.source.resolve.reference.PsiReferenceContributorEP.getInstance(
 at com.intellij.psi.impl.source.resolve.reference.PsiReferenceContributorEP.getInstance(
 at com.intellij.openapi.util.KeyedExtensionCollector.buildExtensions(
 at com.intellij.openapi.util.KeyedExtensionCollector.buildExtensions(
 at com.intellij.openapi.util.KeyedExtensionCollector.forKey(
 at com.intellij.lang.LanguageExtension.allForLanguage(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl$2.create(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl$2.create(
 at com.intellij.util.containers.FactoryMap.get(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getRegistrar(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(
 at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(
 at com.intellij.psi.impl.source.PsiPlainTextFileImpl.getReferences(
 at org.intellij.plugins.intelliLang.references.InjectedReferencesContributor.getInjectedReferences(
 at org.intellij.plugins.intelliLang.references.InjectedReferencesInspection$1.visitElement(
 at com.intellij.psi.PsiElementVisitor.visitFile(
 at com.intellij.psi.PsiElementVisitor.visitPlainTextFile(
 at com.intellij.psi.impl.source.PsiPlainTextFileImpl.accept(
 at com.intellij.codeInspection.InspectionEngine.acceptElements(
 at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$200(
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(
 at com.intellij.concurrency.ApplierCompleter.a(
 at com.intellij.concurrency.ApplierCompleter.access$000(
 at com.intellij.concurrency.ApplierCompleter$
 at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(
 at com.intellij.concurrency.ApplierCompleter$
 at com.intellij.openapi.progress.impl.CoreProgressManager.a(
 at com.intellij.openapi.progress.impl.CoreProgressManager.a(
 at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(
 at com.intellij.concurrency.ApplierCompleter.a(
 at com.intellij.concurrency.ApplierCompleter.compute(
 at jsr166e.CountedCompleter.exec(
 at jsr166e.ForkJoinTask.doExec(
 at jsr166e.ForkJoinPool$WorkQueue.runTask(
 at jsr166e.ForkJoinPool.scan(
 at jsr166e.ForkJoinPool.runWorker(
Caused by: java.lang.UnsupportedClassVersionError: com/simpleplugin/SimpleReferenceContributor : Unsupported major.minor version 52.0
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClassCond(
 at java.lang.ClassLoader.defineClass(
 at java.lang.ClassLoader.defineClass(
 at com.intellij.util.lang.UrlClassLoader._defineClass(
 at com.intellij.util.lang.UrlClassLoader.defineClass(
 at com.intellij.util.lang.UrlClassLoader._findClass(
 ... 54 more


Would it matter if I am using jdk 1.8 instead of 1.6??

I would asume that as long as when you run the debug configuration and everything works (as it does). All should be fine when you deploy?



this exception means that you compiled the plugin using JDK 1.8 but run it under JDK 1.6. To fix the problem you should either compile the plugin
using JDK 1.6 or run PyCharm under JDK 1.8

Nikolay Chashnikov
"Develop with pleasure!"



So im up and running thanks for the help!

Im at step 4 in the tutorial

"Now we can generate a lexer class via JFlex Generator from the context menu or via⌘⇧G shortcut on Simple.flex file."

But during the download of the lexer skeleton framework the download dialogu is erroring

Failed to download '': Cannot download '': Server returned HTTP response code: 503 for URL:
, response: 503 backend read error


Please sign in to leave a comment.