Skip to content

Commit

Permalink
#203 Added explanation to empty dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-Biju committed Nov 23, 2023
1 parent 4a062ad commit 47da67c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
}
]
},
"viewsWelcome": [
{
"view": "liberty-dev",
"contents": "%views.welcome.message%"
}
],
"commands": [
{
"command": "liberty.dev.show.commands",
Expand Down
3 changes: 2 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -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”. "
}
5 changes: 5 additions & 0 deletions src/liberty/libertyProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -213,6 +214,10 @@ export class ProjectProvider implements vscode.TreeDataProvider<LibertyProject>

// eslint-disable-next-line @typescript-eslint/no-unused-vars
public async getChildren(element?: LibertyProject): Promise<LibertyProject[]> {

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 [];
Expand Down

0 comments on commit 47da67c

Please sign in to comment.