Skip to content

DevFaqAddMacroableAction

Antonio Vieiro edited this page Jan 25, 2018 · 1 revision

DevFaqAddMacroableAction

How do I create an action which can be invoked by a macro?

Use @EditorActionRegistration!

@NbBundle.Messages({ "CTL_MyAction=Let's go", "macro-name=Let's go" })
@EditorActionRegistration(
	name = "macro-name",
	mimeType = "text/x-java",
	menuPath = "Source", menuPosition = 0, menuText = "#CTL_MyAction")
public class MyAction extends org.netbeans.editor.BaseAction {
 //...
}

Then your action can be invoked by a macro (and even recorded by the macro recorder)

Apache Migration Information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/DevFaqAddMacroableAction , that was last modified by NetBeans user Markiewb on 2016-09-12T19:38:37Z.

NOTE: This document was automatically converted to the AsciiDoc format on 2018-01-26, and needs to be reviewed.

Clone this wiki locally