Is it possible to trigger function/action of another plugin from a plugin.
HI,
I have two plugins. ProjPlugin handles project related operations. UserActions plugin listens to user actions. Is it possible to trigger ProjPlugins related action (say, refresh project) from UserActions plugin?
Alternative is to move the UserActions code to ProjPlugin.
Thanks,
Chandra
Please sign in to leave a comment.
Hello chandra,
Yes. You can call ActionManager.getAction() to retrieve the action of any
plugin by ID.
Alternatively, you can make the UserActions plugin depend on the ProjPlugin
and call the necessary method directly.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
An example would be the following, which can be used to copy the FQN of a class in python into the clipboard:
Does getAction also allow invoking actions which are part of the UI as shipped, e.g. any action that is included in PyCharm? or is it constrained to invoking actions introduced by plugins?