Skip to content

Commit ec7ca25

Browse files
authored
fix: Refine the setting for 'java.project.exportJar.targetPath' (#363)
1 parent a1d66be commit ec7ca25

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ A lightweight extension to provide additional Java project explorer features. It
3737
| `java.dependency.autoRefresh` | Specify whether to automatically sync the change from editor to the Java Projects explorer. | `true` |
3838
| `java.dependency.refreshDelay` | The delay time (ms) the auto refresh is invoked when changes are detected. | `2000ms` |
3939
| `java.dependency.packagePresentation` | Specify how to display the package. Supported values are: `flat`, `hierarchical`.| `flat` |
40+
| `java.project.exportJar.targetPath` | The output path of export jar. When this setting is **empty** or equals `askUser`, a file explorer will pop up to let the user select the output location.| `${workspaceFolder}/${workspaceFolderBasename}.jar` |
4041

4142
## Contribution
4243

package.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,22 @@
186186
},
187187
"java.project.exportJar.targetPath": {
188188
"type": "string",
189-
"enum": [
190-
"${workspaceFolder}/${workspaceFolderBasename}.jar",
191-
"askUser"
189+
"anyOf": [
190+
{
191+
"enum": [
192+
"${workspaceFolder}/${workspaceFolderBasename}.jar",
193+
"askUser",
194+
""
195+
],
196+
"enumDescriptions": [
197+
"%configuration.java.project.exportJar.targetPath.workspaceFolder%",
198+
"%configuration.java.project.exportJar.targetPath.askUser%",
199+
"%configuration.java.project.exportJar.targetPath.askUser%"
200+
]
201+
},
202+
"string"
192203
],
193-
"description": "%configuration.java.project.exportJar.targetPath%",
204+
"markdownDescription": "%configuration.java.project.exportJar.targetPath%",
194205
"default": "${workspaceFolder}/${workspaceFolderBasename}.jar"
195206
}
196207
}

package.nls.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"configuration.java.dependency.autoRefresh": "Synchronize Java Projects explorer with changes",
2525
"configuration.java.dependency.refreshDelay": "The delay time (ms) the auto refresh is invoked when changes are detected",
2626
"configuration.java.dependency.packagePresentation": "Package presentation mode: flat or hierarchical",
27-
"configuration.java.project.exportJar.targetPath": "The default output path of export jar.",
27+
"configuration.java.project.exportJar.targetPath": "Specifies the output path of export jar. The default value is `${workspaceFolder}/${workspaceFolderBasename}.jar`. To select the output location manually each time exporting the jar file, simply leave it empty or set it to `askUser`.",
28+
"configuration.java.project.exportJar.targetPath.workspaceFolder": "Export the jar file into the workspace folder. Its name is the same as the folder's.",
29+
"configuration.java.project.exportJar.targetPath.askUser": "You will select the output location manually each time exporting the jar file.",
2830
"taskDefinitions.java.project.exportJar.label": "The label of export jar task.",
2931
"taskDefinitions.java.project.exportJar.elements": "The content list of the exported jar.",
3032
"taskDefinitions.java.project.exportJar.mainClass": "The main class in the manifest of the exported jar.",

package.nls.zh.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"configuration.java.dependency.autoRefresh": "在 Java 项目管理器中自动同步修改",
2525
"configuration.java.dependency.refreshDelay": "控制 Java 项目管理器刷新的延迟时间 (毫秒)",
2626
"configuration.java.dependency.packagePresentation": "Java 包显示方式: 平行显示或者分层显示",
27-
"configuration.java.project.exportJar.targetPath": "导出 Jar 文件的输出路径",
27+
"configuration.java.project.exportJar.targetPath": "导出 Jar 文件的默认路径,默认值为 `${workspaceFolder}/${workspaceFolderBasename}.jar` 。您也可以将此选项置为空串或 `askUser` 来手动选择 jar 文件的导出目录。",
28+
"configuration.java.project.exportJar.targetPath.workspaceFolder": "导出 Jar 文件到工作空间文件夹下。Jar 文件的名称和工作空间文件夹的名称相同。",
29+
"configuration.java.project.exportJar.targetPath.askUser": "您将在每次导出 jar 文件时手动选择输出目录。",
2830
"taskDefinitions.java.project.exportJar.label": "导出 Jar 任务的名称。",
2931
"taskDefinitions.java.project.exportJar.elements": "导出 Jar 文件的内容列表。",
3032
"taskDefinitions.java.project.exportJar.mainClass": "导出 Jar 文件的 main 函数所在的类。",

0 commit comments

Comments
 (0)