How to troubleshoot disabled plugin in PyCharm?

  • Using IDEA community edition, I create a simple test plugin and a zip package for the plugin
  • The plugin works as expected when running it in IDEA community edition
  • I then try to install it into PyCharm (using settings/plugins/install plugin from disk)
  • After restart, on the home screen my plugin is listed as "Plugin name (disabled)"


Questions:

  • How do I troubleshoot this? I cannot find anything in the PyCharm event log or in the disk log files.
  • Is there anything special I have to do in my plugin to make it work in PyCharm?


Below is the contents of plugin.iml and plugin.xml. I have also attached the zip package (plugin.zip) and the source code (source.zip).

plugin.iml:

<?xml version="1.0" encoding="UTF-8"?>
<module type="PLUGIN_MODULE" version="4">
  <component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/META-INF/plugin.xml" />
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="module-library">
      <library>
        <CLASSES>
          <root url="jar://$MODULE_DIR$/../Jython-2.7a2/jython.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
  </component>
</module>



plugin.xml:

<idea-plugin version="2">
  <name>Jython macro plugin</name>
  <description>Write IDEA macros in Jython</description>
  <version>1.0</version>
  <vendor>YourCompany</vendor>

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

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

  <actions>
    <!-- Add your actions here -->
      <group id="JyScriptPlugin.SampleMenu" text="Sample Menu" description="Sample menu">
          <add-to-group group-id="MainMenu" anchor="last" />
          <action id="RunJythonScript" text="Run Jython Script" description="Runs a Jython Script"/>
      </group>

  </actions>

  <extensions defaultExtensionNs="com.intellij">
    <!-- Add your extensions here -->
  </extensions>
</idea-plugin>



Attachment(s):
source.zip
plugin.zip
2 comments
Comment actions Permalink

Thank you!

Adding

<depends>com.intellij.modules.platform</depends>


to plugin.xml did the trick.

0

Please sign in to leave a comment.