Skip to content

Commit

Permalink
Merge pull request #279 from aparnamichael/issue258_containerInStartF…
Browse files Browse the repository at this point in the history
…orParentModule

#258 Start in container option not appearing if parent folder of Liberty project is opened in VS Code
  • Loading branch information
aparnamichael authored Aug 16, 2023
2 parents 6975ecb + d8efdc8 commit e976605
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/liberty/libertyProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,22 @@ export class ProjectProvider implements vscode.TreeDataProvider<LibertyProject>
for (const serverXML of serverXMLPaths) {
const folder = vscodePath.parse(vscodePath.resolve(serverXML, "../../../../")).dir;
const pomFile = vscodePath.resolve(folder, "pom.xml");
if ( fse.existsSync(pomFile)) {
if ( !this.addExistingProjectToNewProjectsMap(pomFile, LIBERTY_MAVEN_PROJECT, newProjectsMap) ) {

if (fse.existsSync(pomFile) && !newProjectsMap.has(pomFile)) {
if (!this.addExistingProjectToNewProjectsMap(pomFile, LIBERTY_MAVEN_PROJECT, newProjectsMap)) {
const xmlString = await fse.readFile(pomFile, "utf8");
const project = await createProject(this._context, pomFile, LIBERTY_MAVEN_PROJECT, xmlString);
newProjectsMap.set(pomFile, project);
newProjectsMap.set(pomFile, project);
}
} else {
const gradleFile = vscodePath.resolve(folder, "build.gradle");
if ( fse.existsSync (gradleFile) ) {
if ( !this.addExistingProjectToNewProjectsMap(gradleFile, LIBERTY_GRADLE_PROJECT, newProjectsMap) ) {
if (fse.existsSync(gradleFile) && !newProjectsMap.has(gradleFile)) {
if (!this.addExistingProjectToNewProjectsMap(gradleFile, LIBERTY_GRADLE_PROJECT, newProjectsMap)) {
const project = await createProject(this._context, gradleFile, LIBERTY_GRADLE_PROJECT);
newProjectsMap.set(gradleFile, project);
}
}
}
}
}
this.projects = newProjectsMap;
}
Expand Down

0 comments on commit e976605

Please sign in to comment.