You must declare your action in your layer.xml file. Like this:

<folder name="Editors">
 <folder name="text">
   <folder name="x-java">
      <folder name="Popup">
         <file name="org-mymodule-MyAction.instance"/>
      </folder>
   </folder>
 </folder>
</folder>

Prior to NB 4.2, you could use Editors/text/base/Popup/ to add an action to all editor kits. As of NB 4.2, use just Editors/Popup/ instead.

Source: NetBeans FAQ