You have to override the

   public Action[] getActions( boolean context )

of your node.

If this node is really a DataNode for your own file type, instead see DevFaqActionAddFileMime.

Source: NetBeans FAQ