title: Netbeans: register context menu action for any type of file
body: <p>I'm trying to register a new context-menu action. It is meant to be present for <strong>any type of file</strong>.</p>
  <p>Like this:</p>
  <p><a href="https://i.stack.imgur.com/WAhaf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WAhaf.png" alt="enter image description here" /></a></p>
  <p>Here's what I do:</p>
  <pre><code>@ActionReferences({
      @ActionReference(path = &quot;Loaders/Languages/Actions&quot;),
      @ActionReference(path = &quot;Loaders/content/unknown/Actions&quot;)}
  )
  @Messages(&quot;CTL_MyAction=My wonderful action&quot;)
  public final class MyAction extends CookieAction {
  </code></pre>
  <p>But if so, my action is only present on unknown file types (the <code>Loaders/content/unknown/Actions</code> path). I was kind of hoping that <code>Loaders/Languages/Actions</code> would do the trick and mean that I would register my action for known file types too.</p>
  <p>What works is (specifically for <code>.java</code> files):</p>
  <pre><code>@ActionReferences({
      @ActionReference(path = &quot;Loaders/Languages/Actions&quot;),
      @ActionReference(path = &quot;Loaders/content/unknown/Actions&quot;),
      @ActionReference(path = &quot;Loaders/text/x-java/Actions&quot;)}
  )
  @Messages(&quot;CTL_MyAction=My wonderful action&quot;)
  public final class MyAction extends CookieAction {
  </code></pre>
  <p>But obviously that solution seems like a dead-end as I simply want to register for any file type, known or unknown, not <em>specific</em> file types. In short, I was maybe hoping for a path like <code>Loaders/content/any/Actions</code> where I could register my action.</p>
  <p>Please advice.</p>