我保证,我读过: http: //netbeans.org/kb/articles/freeform-config.html
我有一个 java 自由格式项目,我想修改它以在Netbeans 7.2的上下文菜单中包含一个“测试单个文件”目标
包含的链接概述了创建一个名为“test.single”的操作(为了覆盖 Netbeans 的测试单个文件命令),并且在该操作创建中,必须指定一个 ant 目标和一个上下文对象,如下所示:
<context>
<property>testclass</property>
<folder>${current.dir}</folder>
<pattern>\.java$</pattern>
<format>java-name</format>
<arity>
<one-file-only/>
</arity>
</context>
总而言之,我有:
在 ide-actions 块中的 project.xml 中创建操作:
<action name="test.single">
<target>test-single</target>
<context>
<property>testclass</property>
<folder>${current.dir}</folder>
<pattern>\.java$</pattern>
<format>java-name</format>
<arity>
<one-file-only/>
</arity>
</context>
</action>
将 ide-action 添加到上下文菜单块”
<ide-action name="test.single"/>
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.
I've checked and validated the xml and it all seems to check out. What could I be doing wrong?
thanks in advance!