From 47da67c6b1f83d359185a05ab8ce9dc8f4f07e6a Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 23 Nov 2023 15:04:08 +0530 Subject: [PATCH 1/8] #203 Added explanation to empty dashboard --- package.json | 6 ++++++ package.nls.json | 3 ++- src/liberty/libertyProject.ts | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cec208e8..f7124aec 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,12 @@ } ] }, + "viewsWelcome": [ + { + "view": "liberty-dev", + "contents": "%views.welcome.message%" + } + ], "commands": [ { "command": "liberty.dev.show.commands", diff --git a/package.nls.json b/package.nls.json index 9af4b6c3..881f03c9 100644 --- a/package.nls.json +++ b/package.nls.json @@ -12,5 +12,6 @@ "commands.title.view.test.report": "View test report", "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", - "commands.title.show.commands": "Show Liberty commands" + "commands.title.show.commands": "Show Liberty commands", + "views.welcome.message":" \n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu. \n 2. If there is one or more existing Maven or Gradle projects open in the VS Code Explorer, try one of the following: \n -Configure the Liberty build plugin in the build file of an existing Maven or Gradle project.\n - Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”.\n - Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”. " } \ No newline at end of file diff --git a/src/liberty/libertyProject.ts b/src/liberty/libertyProject.ts index 8c860c09..0d9897d9 100644 --- a/src/liberty/libertyProject.ts +++ b/src/liberty/libertyProject.ts @@ -18,6 +18,7 @@ import { EXCLUDED_DIR_PATTERN, LIBERTY_GRADLE_PROJECT, LIBERTY_GRADLE_PROJECT_CO import { BuildFileImpl, GradleBuildFile } from "../util/buildFile"; import { DashboardData } from "./dashboard"; import { BaseLibertyProject } from "./baseLibertyProject"; +import path = require("path"); const MAVEN_ICON = "maven-tag.png"; const GRADLE_ICON = "gradle-tag-1.png"; @@ -213,6 +214,10 @@ export class ProjectProvider implements vscode.TreeDataProvider // eslint-disable-next-line @typescript-eslint/no-unused-vars public async getChildren(element?: LibertyProject): Promise { + + if (this.projects.size <= 0 ) { + return Promise.resolve([]); + } if (vscode.workspace.workspaceFolders === undefined) { vscode.window.showInformationMessage(localize("no.liberty.project.found.in.empty.workspace")); return []; From 14656fd17d21d31ca29f3a4ece158bcad45bc12e Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 23 Nov 2023 15:55:22 +0530 Subject: [PATCH 2/8] #203 info fixes to empty window tool --- src/liberty/libertyProject.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/liberty/libertyProject.ts b/src/liberty/libertyProject.ts index 0d9897d9..76598814 100644 --- a/src/liberty/libertyProject.ts +++ b/src/liberty/libertyProject.ts @@ -18,7 +18,7 @@ import { EXCLUDED_DIR_PATTERN, LIBERTY_GRADLE_PROJECT, LIBERTY_GRADLE_PROJECT_CO import { BuildFileImpl, GradleBuildFile } from "../util/buildFile"; import { DashboardData } from "./dashboard"; import { BaseLibertyProject } from "./baseLibertyProject"; -import path = require("path"); + const MAVEN_ICON = "maven-tag.png"; const GRADLE_ICON = "gradle-tag-1.png"; @@ -215,9 +215,9 @@ export class ProjectProvider implements vscode.TreeDataProvider // eslint-disable-next-line @typescript-eslint/no-unused-vars public async getChildren(element?: LibertyProject): Promise { - if (this.projects.size <= 0 ) { - return Promise.resolve([]); - } + if (this.projects.size <= 0) { + return Promise.resolve([]); + } if (vscode.workspace.workspaceFolders === undefined) { vscode.window.showInformationMessage(localize("no.liberty.project.found.in.empty.workspace")); return []; From b462dd977c2b51c6e229cb2b9766f6b50bda7ff3 Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 23 Nov 2023 16:04:39 +0530 Subject: [PATCH 3/8] #203 fixes --- src/liberty/libertyProject.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/liberty/libertyProject.ts b/src/liberty/libertyProject.ts index 76598814..997c7c8d 100644 --- a/src/liberty/libertyProject.ts +++ b/src/liberty/libertyProject.ts @@ -19,7 +19,6 @@ import { BuildFileImpl, GradleBuildFile } from "../util/buildFile"; import { DashboardData } from "./dashboard"; import { BaseLibertyProject } from "./baseLibertyProject"; - const MAVEN_ICON = "maven-tag.png"; const GRADLE_ICON = "gradle-tag-1.png"; const OL_LOGO_ICON = "ol_logo.png"; From 7c0a6ac87b5ede9c0cdcdb1d9a5efb2416d2d9c7 Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Mon, 27 Nov 2023 11:23:43 +0530 Subject: [PATCH 4/8] added new changes --- package.nls.json | 3 ++- src/liberty/libertyProject.ts | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.nls.json b/package.nls.json index 881f03c9..3e04ef90 100644 --- a/package.nls.json +++ b/package.nls.json @@ -13,5 +13,6 @@ "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", "commands.title.show.commands": "Show Liberty commands", - "views.welcome.message":" \n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu. \n 2. If there is one or more existing Maven or Gradle projects open in the VS Code Explorer, try one of the following: \n -Configure the Liberty build plugin in the build file of an existing Maven or Gradle project.\n - Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”.\n - Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”. " + "views.welcome.message":"\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If there is one or more existing Maven or Gradle projects open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven info](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle info.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more info.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" + } \ No newline at end of file diff --git a/src/liberty/libertyProject.ts b/src/liberty/libertyProject.ts index 997c7c8d..8c860c09 100644 --- a/src/liberty/libertyProject.ts +++ b/src/liberty/libertyProject.ts @@ -213,10 +213,6 @@ export class ProjectProvider implements vscode.TreeDataProvider // eslint-disable-next-line @typescript-eslint/no-unused-vars public async getChildren(element?: LibertyProject): Promise { - - if (this.projects.size <= 0) { - return Promise.resolve([]); - } if (vscode.workspace.workspaceFolders === undefined) { vscode.window.showInformationMessage(localize("no.liberty.project.found.in.empty.workspace")); return []; From 509435af156b0fc02428e41b7c668f42a69b9435 Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 30 Nov 2023 14:46:11 +0530 Subject: [PATCH 5/8] Update instruction added --- package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.nls.json b/package.nls.json index 3e04ef90..051aa91b 100644 --- a/package.nls.json +++ b/package.nls.json @@ -13,6 +13,6 @@ "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", "commands.title.show.commands": "Show Liberty commands", - "views.welcome.message":"\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If there is one or more existing Maven or Gradle projects open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven info](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle info.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more info.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" + "views.welcome.message":"\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven information](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle information.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more information.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" } \ No newline at end of file From 1b4db771341eadbea5a5518574dde8be9ec499ee Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 30 Nov 2023 14:49:36 +0530 Subject: [PATCH 6/8] Update information added --- package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.nls.json b/package.nls.json index 051aa91b..21b51a93 100644 --- a/package.nls.json +++ b/package.nls.json @@ -13,6 +13,6 @@ "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", "commands.title.show.commands": "Show Liberty commands", - "views.welcome.message":"\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven information](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle information.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more information.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" + "views.welcome.message": "\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven information](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle information.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more information.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" } \ No newline at end of file From 11e2704dfd8693c6dc2d4b691b76c96cde43028d Mon Sep 17 00:00:00 2001 From: Rahul-Biju <133862121+Rahul-Biju@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:52:44 +0530 Subject: [PATCH 7/8] Update package.nls.json Co-authored-by: David Mueller <48686014+dmuelle@users.noreply.github.com> --- package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.nls.json b/package.nls.json index 21b51a93..de2170d1 100644 --- a/package.nls.json +++ b/package.nls.json @@ -13,6 +13,6 @@ "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", "commands.title.show.commands": "Show Liberty commands", - "views.welcome.message": "\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following:\n a. Configure the Liberty build plugin in the build file of an existing Maven or Gradle project. [Click here for more Maven information](https://github.com/OpenLiberty/ci.maven/#configuration) or [Click here for more Gradle information.](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script)\n b. Add a server.xml file to an existing Maven or Gradle project at “src/main/liberty/config”. [Click here for more information.](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml)\n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" + "views.welcome.message": "\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following actions:\n a. Configure the Liberty build plugin in the build file of an existing [Maven](https://github.com/OpenLiberty/ci.maven/#configuration) or [Gradle](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script) project.\n b. Add a [server.xml file](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml) to an existing Maven or Gradle project at “src/main/liberty/config”. \n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" } \ No newline at end of file From 7e359b7fb9ca7cc5bf98d5662be5829d2d85c913 Mon Sep 17 00:00:00 2001 From: Rahul-Biju <133862121+Rahul-Biju@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:16:49 +0530 Subject: [PATCH 8/8] Update package.nls.json Co-authored-by: YK Chang --- package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.nls.json b/package.nls.json index de2170d1..1a0f0318 100644 --- a/package.nls.json +++ b/package.nls.json @@ -13,6 +13,6 @@ "commands.title.add.project": "Add project to Liberty Dashboard", "commands.title.remove.project": "Remove project from Liberty Dashboard", "commands.title.show.commands": "Show Liberty commands", - "views.welcome.message": "\n 1. If no projects are open in the VS Code Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the VS Code Explorer, try one of the following actions:\n a. Configure the Liberty build plugin in the build file of an existing [Maven](https://github.com/OpenLiberty/ci.maven/#configuration) or [Gradle](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script) project.\n b. Add a [server.xml file](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml) to an existing Maven or Gradle project at “src/main/liberty/config”. \n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the VS Code command palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" + "views.welcome.message": "\n 1. If no projects are open in the Explorer, open or create a Liberty project using the File menu.\n[Open Project](command:vscode.openFolder) \n 2. If one or more existing Maven or Gradle projects are open in the Explorer, try one of the following actions:\n a. Configure the Liberty build plugin in the build file of an existing [Maven](https://github.com/OpenLiberty/ci.maven/#configuration) or [Gradle](https://github.com/OpenLiberty/ci.gradle#adding-the-plugin-to-the-build-script) project.\n b. Add a [server.xml file](https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-xml) to an existing Maven or Gradle project at “src/main/liberty/config”. \n c. Manually add an existing Maven or Gradle project to the Liberty Dashboard through the Command Palette action “Liberty: Add project to Liberty Dashboard”.\n [Add project to Liberty Dashboard](command:liberty.dev.add.project)" } \ No newline at end of file