Pre-requisites

If you don’t have prior experience with NetBeans Platform, read that tutorial. That's a must! Now, after you have done that, you might like to explore a bit more. So, you should give the following a read as well(if you want you can skip it for a while and read it along with my tutorial),

This overview will quickly familiarize you with how NetBeans plug-in modules interact with the NetBeans infrastructure and with each other.

Now, you're ready for plugin-development. So, lets get started then!

Getting Started

Aim of this tutorial, is to let you make an Conditionally Enabled (see CookieAction) Action, without using New File Type Wizard.

What's CookieAction?

"An action dependent on the cookies of the selected nodes", as defined in the Javadocs! Exactly, so when you have done following transformation, you would see the action, but would be enabled, only when the node is selected, which supports particular Cookies. You will understand more, as you read further.

Creating a Menu Item and Toolbar Button

You use the NetBeans plug-in module file templates to create the basis of the module's functionality. When you use a file template, the IDE registers the item that you create in the layer.xml file. After using a wizard to create the file template, you use the NetBeans API List to continue developing the module.

We won't be using any Wizard, as said before. So, follow these steps to create your Action;

No need to worry, when you first created this project, a file called Bundle.properties gets created into <tt>$your-package</tt>, where SayCheez.java is present. Just add the following line into properties file, and continue coding!

CTL_SayCheez=Say Cheez...
# You may change the content on the right side of this assignment operator.