Interacting with other plugins

When developing a plugin I know its possible to define other plugins which my plugin depends on. How ever its there a way to trigger those plugin actions from my plugin code.

For examples

I want to call maven effective pom action and then analyze all submodules for multiple dependency delaration in submodules with different version.

How this can be acheived.

1 comment
Comment actions Permalink

assuming that this other plugin's action is triggered by YourActionImpl registered in your plugin,

why not try this:


YourActionImpl extends AnAction{

public abstract void actionPerformed(AnActionEvent e){


ActionManager inst = ActionManager.getInstance();
AnAction other = inst.getAction(String actionId);  // another plugin's action

InputEvent ie = e.getInputEvent

inst.tryToExecute(other, ie, ie.getComponent(), null, true);
}

}

?

I did not try this but it may work.

0

Please sign in to leave a comment.