|
1 | 1 | [ |
2 | | - { |
3 | | - "label": "Run $ZED_CUSTOM_java_class_name", |
4 | | - "command": "pkg=\"${ZED_CUSTOM_java_package_name:}\"; cls=\"$ZED_CUSTOM_java_class_name\"; if [ -n \"$pkg\" ]; then c=\"$pkg.$cls\"; else c=\"$cls\"; fi; if [ -f pom.xml ]; then ./mvnw clean compile exec:java -Dexec.mainClass=\"$c\"; elif [ -f gradlew ]; then ./gradlew run -PmainClass=\"$c\"; else find . -name '*.java' -not -path './bin/*' -not -path './target/*' -not -path './build/*' -print0 | xargs -0 javac -d bin && java -cp bin \"$c\"; fi;", |
5 | | - "use_new_terminal": false, |
6 | | - "reveal": "always", |
7 | | - "tags": ["java-main"], |
8 | | - "shell": { |
9 | | - "with_arguments": { |
10 | | - "program": "/bin/sh", |
11 | | - "args": ["-c"] |
12 | | - } |
| 2 | + { |
| 3 | + "label": "Run $ZED_CUSTOM_java_class_name", |
| 4 | + "command": "pkg=\"${ZED_CUSTOM_java_package_name:}\"; cls=\"$ZED_CUSTOM_java_class_name\"; if [ -n \"$pkg\" ]; then c=\"$pkg.$cls\"; else c=\"$cls\"; fi; if [ -f pom.xml ]; then ./mvnw clean compile exec:java -Dexec.mainClass=\"$c\"; elif [ -f gradlew ]; then ./gradlew run -PmainClass=\"$c\"; else find . -name '*.java' -not -path './bin/*' -not -path './target/*' -not -path './build/*' -print0 | xargs -0 javac -d bin && java -cp bin \"$c\"; fi;", |
| 5 | + "use_new_terminal": false, |
| 6 | + "reveal": "always", |
| 7 | + "tags": ["java-main"], |
| 8 | + "shell": { |
| 9 | + "with_arguments": { |
| 10 | + "program": "/bin/sh", |
| 11 | + "args": ["-c"] |
13 | 12 | } |
14 | | - }, |
| 13 | + } |
| 14 | + }, |
15 | 15 | { |
16 | | - "label": "Test $ZED_CUSTOM_java_class_name.$ZED_CUSTOM_java_method_name", |
17 | | - "command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; m=\"$ZED_CUSTOM_java_method_name\"; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$c#$m\"; elif [ -f gradlew ]; then ./gradlew test --tests $c.$m; else >&2 echo 'No build system found'; exit 1; fi;", |
| 16 | + "label": "$ZED_CUSTOM_java_class_name.${ZED_CUSTOM_java_outer_class_name:}.$ZED_CUSTOM_java_method_name", |
| 17 | + "command": "package=\"$ZED_CUSTOM_java_package_name\"; outer=\"${ZED_CUSTOM_java_outer_class_name:}\"; inner=\"$ZED_CUSTOM_java_class_name\"; method=\"$ZED_CUSTOM_java_method_name\"; sep=\"$\"; if [ -n \"$outer\" ]; then c=\"$outer$sep$inner\"; else c=\"$inner\"; fi; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$package.$c#$method\"; elif [ -f gradlew ]; then ./gradlew test --tests \"$package.$c.$method\"; else >&2 echo 'No build system found'; exit 1; fi;", |
18 | 18 | "use_new_terminal": false, |
19 | 19 | "reveal": "always", |
20 | | - "tags": ["java-test-method"], |
| 20 | + "tags": ["java-test-method", "java-test-method-nested"], |
21 | 21 | "shell": { |
22 | 22 | "with_arguments": { |
23 | 23 | "program": "/bin/sh", |
|
27 | 27 | }, |
28 | 28 | { |
29 | 29 | "label": "Test class $ZED_CUSTOM_java_class_name", |
30 | | - "command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$c\"; elif [ -f gradlew ]; then ./gradlew test --tests $c; else >&2 echo 'No build system found'; exit 1; fi;", |
| 30 | + "command": "package=\"$ZED_CUSTOM_java_package_name\"; outer=\"${ZED_CUSTOM_java_outer_class_name:}\"; inner=\"$ZED_CUSTOM_java_class_name\"; sep=\"$\"; if [ -n \"$outer\" ]; then c=\"$outer$sep$inner\"; else c=\"$inner\"; fi; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$package.$c\"; elif [ -f gradlew ]; then ./gradlew test --tests \"$package.$c\"; else >&2 echo 'No build system found'; exit 1; fi;", |
31 | 31 | "use_new_terminal": false, |
32 | 32 | "reveal": "always", |
33 | | - "tags": ["java-test-class"], |
| 33 | + "tags": ["java-test-class", "java-test-class-nested"], |
34 | 34 | "shell": { |
35 | 35 | "with_arguments": { |
36 | 36 | "program": "/bin/sh", |
|
0 commit comments