I'm new to plugin development I'm trying to create a Pycharm plugin to add an option to the EditorPopupMenu which will only show up if a pytest function is right clicked. I'm aiming for the action to run the individual pytest function which was clicked and be able to do it with a custom configuration to run the tests with a custom built framework tool.
I know adding an option to the EditorPopupMenu can be done with this:
<action id="HelloWorld" class="actions.HelloWorldAction" text="Hello World">
<add-to-group group-id="EditorPopupMenu.Run" anchor="first"></add-to-group>
But I'm having trouble finding documentation that helps with the rest of what I need to do which is:
1. Determine if what was right clicked was a function which follows the naming convention of pytest (test_func)
2. Run that test function with a custom configuration