Apache NetBeans
Apache NetBeans
Latest release

Apache NetBeans 24

Download

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)