Pycharm right click menu group-id?

Hello,

I'm trying to make my plugin run in PyCharm as well as IntelliJ. When I load my plugin on PyCharm however, the option that's supposed to show up on the right click menu in the editor is not showing up. Is there a separate group-id for PyCharm for this purpose? If not, why is it possibly not showing up?

 

Thanks,

- Victor

0

Which group ID do you use?

0
Avatar
Permanently deleted user

I also want to add that the 

public void initComponent()

method of my action class is not being run. Am I missing something important? If so, where can I get information on making a PyCharm plugin?

0
Avatar
Permanently deleted user
<action class="GatherData" id="RightClickButton" text="Gather Data">
<add-to-group group-id="EditorPopupMenu" anchor="last"/>

That's what I use. I have a feeling this may have to do with my <depends> tag in the plugin.xml. when I put in

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

intelliJ doesn't recognize it. How do I flag the program compatible with PyCharm?

 

UPDATE:

It was red underlining it but apparently it doesn't mean that it doesn't work. I just ran it and everything works now. 

0

initComponent has nothing to do with action classes. This method is called for classes registered as ApplicationComponent, but most probably you don't need to have this in your plugin, see the javadoc for details.

Group 'EditorPopupMenu' is present in all IDEs, so if your action is added to it its 'update' method should be called when the popup menu is shown.

If you add "<depends>com.intellij.modules.python</depends>" tag, the plugin will be compatible with PyCharm, but won't be compatible with IDEA, see our docs for details. 'depends' tag determines whether the plugin is compatible with an IDE, and if your see your plugin as enabled in Settings | Plugins it means that you specified 'depends' tag correctly.

0

请先登录再写评论。