Skip to content

Commit

Permalink
feat: Add welcome view when no folder opened (microsoft#1141)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Feb 26, 2021
1 parent 02cef16 commit 1ebc033
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,18 @@
"viewsWelcome": [
{
"view": "testExplorer",
"contents": "No test cases are listed because the Java Language Server is currently running in [LightWeight Mode](https://aka.ms/vscode-java-lightweight). To show test cases, click on the button to switch to Standard Mode.\n[Switch to Standard Mode](command:java.server.mode.switch?%5B%22Standard%22,true%5D)",
"contents": "%contributes.viewsWelcome.inLightWeightMode%",
"when": "java:serverMode == LightWeight"
},
{
"view": "testExplorer",
"contents": "%contributes.viewsWelcome.noProjectWithProjectManagerInstalled%",
"when": "workspaceFolderCount == 0 && java:projectManagerActivated && java:serverMode != LightWeight"
},
{
"view": "testExplorer",
"contents": "%contributes.viewsWelcome.noProjectWithOutProjectManagerInstalled%",
"when": "workspaceFolderCount == 0 && !java:projectManagerActivated && java:serverMode != LightWeight"
}
],
"menus": {
Expand Down
5 changes: 4 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
"configuration.java.test.config.vmArgs.description": "Specify the extra options and system properties for the JVM",
"configuration.java.test.config.args.description": "Specify the command line arguments which will be passed to the test runner",
"configuration.java.test.config.env.description": "Specify the extra environment variables when running the tests",
"configuration.java.test.config.sourcePaths.description": "Specify extra source paths when debugging the tests"
"configuration.java.test.config.sourcePaths.description": "Specify extra source paths when debugging the tests",
"contributes.viewsWelcome.inLightWeightMode": "No test cases are listed because the Java Language Server is currently running in [LightWeight Mode](https://aka.ms/vscode-java-lightweight). To show test cases, click on the button to switch to Standard Mode.\n[Switch to Standard Mode](command:java.server.mode.switch?%5B%22Standard%22,true%5D)",
"contributes.viewsWelcome.noProjectWithProjectManagerInstalled": "No folder opened in Visual Studio Code. You can [open a Java project](command:_java.project.open), or create a new Java project by clicking the button below.\n[Create Java Project](command:java.project.create)",
"contributes.viewsWelcome.noProjectWithOutProjectManagerInstalled": "No folder opened in Visual Studio Code."
}
5 changes: 4 additions & 1 deletion package.nls.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
"configuration.java.test.config.vmArgs.description": "设定启动 JVM 的额外选项和系统属性",
"configuration.java.test.config.args.description": "设定启动 Test Runner 时的命令行参数",
"configuration.java.test.config.env.description": "启动应用程序时自定义的环境变量",
"configuration.java.test.config.sourcePaths.description": "设定调试测试用例时的源代码路径"
"configuration.java.test.config.sourcePaths.description": "设定调试测试用例时的源代码路径",
"contributes.viewsWelcome.inLightWeightMode": "由于 Java 语言服务正运行在 [LightWeight 模式](https://aka.ms/vscode-java-lightweight)下,因此测试用例将不会展示在该视图中。如果您需要展示测试用例,可以点击下方按钮将 Java 语言服务切换至 Standard 模式。\n[切换至 Standard 模式](command:java.server.mode.switch?%5B%22Standard%22,true%5D)",
"contributes.viewsWelcome.noProjectWithProjectManagerInstalled": "当前没有已打开的文件夹,您可以[打开一个 Java 项目](command:_java.project.open),或点击下方按钮创建一个新的 Java 项目。\n[创建 Java 项目](command:java.project.create)",
"contributes.viewsWelcome.noProjectWithOutProjectManagerInstalled": "当前没有已打开的文件夹。"
}

0 comments on commit 1ebc033

Please sign in to comment.