Plug-in - NetBeans

netbeans.org

Plug-in - NetBeans

Plug-in Development

B Listing 1. Action class registration in layer.xml









G

NetBeans

API List and

documentation

netbeans.org/download/dev/javadoc




















A

Figure 3

Adding a

module

dependency

As specified in the GUI Registration panel, the IDE registers the

action class as a menu item and as a toolbar button in the layer.xml

file. See Listing 2.

A 3

In the Source Editor, fill out the

performAction() method as follows:

public void performAction() {

String msg = “I’m plugged in!”;

NotifyDescriptor d = new NotifyDescriptor.Message(

msg, NotifyDescriptor.INFORMATION_MESSAGE);

DialogDisplayer.getDefault().notify(d);

}

56 N NetBeans Magazine

More magazines by this user
Similar magazines