title: Adding junit test single file target to free-form java project in netbeans
body: <p><strong>I promise, I've read:<a href="http://netbeans.org/kb/articles/freeform-config.html" rel="nofollow">http://netbeans.org/kb/articles/freeform-config.html</a></strong></p>
  
  <p>I have a java free-form project that I would like to modify to include a "Test Single File" target to the context menu within <strong>Netbeans 7.2</strong></p>
  
  <p>The included link outlines creating an action with the name "test.single" (in order to override Netbeans' Test Single File command) and within that action creation, one must specify an ant target and a context object like so:</p>
  
  <pre><code>&lt;context&gt;
      &lt;property&gt;testclass&lt;/property&gt;
      &lt;folder&gt;${current.dir}&lt;/folder&gt;
      &lt;pattern&gt;\.java$&lt;/pattern&gt;
      &lt;format&gt;java-name&lt;/format&gt;
      &lt;arity&gt;
          &lt;one-file-only/&gt;
      &lt;/arity&gt;
   &lt;/context&gt;
  </code></pre>
  
  <p>So to summarize, I have:</p>
  
  <p>Created the action in project.xml within the ide-actions block:</p>
  
  <pre><code>&lt;action name="test.single"&gt;                                     
    &lt;target&gt;test-single&lt;/target&gt;
  
    &lt;context&gt;
        &lt;property&gt;testclass&lt;/property&gt;
        &lt;folder&gt;${current.dir}&lt;/folder&gt;
        &lt;pattern&gt;\.java$&lt;/pattern&gt;
        &lt;format&gt;java-name&lt;/format&gt;
        &lt;arity&gt;
            &lt;one-file-only/&gt;
        &lt;/arity&gt;
    &lt;/context&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>Added the ide-action to the context-menu block"</p>
  
  <pre><code>&lt;ide-action name="test.single"/&gt;
  </code></pre>
  
  <p>Adding this to the free-form project's project.xml file yields a grayed out "test.single" entry in the context menu upon right-clicking on the project name. Further, right clicking on a test class in my src/test directory yields a grayed out "Test Single File" entry.</p>
  
  <p>I've checked and validated the xml and it all seems to check out. What could I be doing wrong?  </p>
  
  <p>thanks in advance!</p>