langtools/make/intellij/utils/jtreg-live-templates.xml
changeset 39177 9d13e7c2d65e
equal deleted inserted replaced
39176:eef1aa371e87 39177:9d13e7c2d65e
       
     1 <!-- 
       
     2 The following live template declarations allow for automatic generation of jtreg test headers.
       
     3 Unfortunately, live templates cannot be shared on a per project base, but they can be easily imported
       
     4 by cutting and paste the following lines inside IntelliJ LiveTemplate settings (this will need to be done only once).
       
     5 -->
       
     6      
       
     7 <template name="@test" value="@test&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$ $FILE_NAME$" description="jtreg header (positive test)" toReformat="false" toShortenFQNames="true">
       
     8   <variable name="BUG_ID" expression="groovyScript(&quot;_1 ==~ /T\\d{7}/ ? _1.substring(1).take(7) : 'NNNNNNN'&quot;, fileNameWithoutExtension())" defaultValue="" alwaysStopAt="true" />
       
     9   <variable name="BUG_SUMMARY" expression="&quot;Bug summary&quot;" defaultValue="" alwaysStopAt="true" />
       
    10   <variable name="JTREG_ACTION" expression="&quot;@compile&quot;" defaultValue="" alwaysStopAt="true" />
       
    11   <variable name="FILE_NAME" expression="fileName()" defaultValue="" alwaysStopAt="true" />
       
    12   <context>
       
    13     <option name="JAVA_COMMENT" value="true" />
       
    14   </context>
       
    15 </template>
       
    16 <template name="@test /nodynamiccopyright/" value="@test&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$/fail/ref=$GOLDEN_NAME$ -XDrawDiagnostics $FILE_NAME$" description="jtreg header (negative test)" toReformat="false" toShortenFQNames="true">
       
    17   <variable name="BUG_ID" expression="groovyScript(&quot;_1 ==~ /T\\d{7}/ ? _1.substring(1).take(7) : 'NNNNNNN'&quot;, fileNameWithoutExtension())" defaultValue="NNNNNNN" alwaysStopAt="true" />
       
    18   <variable name="BUG_SUMMARY" expression="&quot;Bug summary&quot;" defaultValue="" alwaysStopAt="true" />
       
    19   <variable name="JTREG_ACTION" expression="&quot;@compile&quot;" defaultValue="" alwaysStopAt="true" />
       
    20   <variable name="GOLDEN_NAME" expression="groovyScript(&quot;_1 + '.out'&quot;, fileNameWithoutExtension())" defaultValue="out.txt" alwaysStopAt="true" />
       
    21   <variable name="FILE_NAME" expression="fileName()" defaultValue="" alwaysStopAt="true" />
       
    22   <context>
       
    23     <option name="JAVA_COMMENT" value="true" />
       
    24   </context>
       
    25 </template>