ActionPerformed is not executed.
Hello friends, you need to know why this does not work when I press the menu.
This is my action:
package org.skelet;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.diagnostic.Logger;
public class TestActionTest extends AnAction {
public static final Logger LOG = Logger.getInstance("org.skelet-log");
@Override
public void actionPerformed(AnActionEvent e) {
LOG.info("Execute ** actionPerformed **.");
}
@Override
public void update(final AnActionEvent e) {
LOG.info("Execute ** update **.");
}
}
And this is the configuration in plugin.xml
<actions>
<group id="org.skelet.TextBoxesGroup" text="_Sample Menu 3" description="Sample menu">
<add-to-group group-id="MainMenu" anchor="last" />
<action id="org.skelet.TestAction44" class="org.skelet.TestActionTest" text="Test Action 6" description="Test Action 5 ..." />
</group>
</actions>
The update method if executed correctly, but the actionPerformed does not.
Can you help me find the problem?
Please sign in to leave a comment.
What OS do you use? Do the other (standard) actions work when invoked from the menu?
macOS Sierra.
Everything is executed. What standard functions do you mean?
The other actions from the main menu (e.g. View | Recent Files).
Does your action work if you execute it via Help | Find Action?
Wao!
not any of the other menu functions do not work.
When I do it via Help | Find Action if it works.
Try also packaging your plugin and installing it in a CE using the plugin manager. I'll bet it works.
I've had this exact experience and can't figure out how to set up an environment so you can actually run your plugin from the plugin project.
In fact, nothing in the tools menu works when I run my plugin project. But as you noticed things do work from Find Action.
I have the same issue