Skip to content

Feature/1167 automatic project import vscode - #2263

Open
QuangAnhLe wants to merge 7 commits into
devonfw:mainfrom
QuangAnhLe:feature/1167-automatic-project-import-vscode
Open

Feature/1167 automatic project import vscode#2263
QuangAnhLe wants to merge 7 commits into
devonfw:mainfrom
QuangAnhLe:feature/1167-automatic-project-import-vscode

Conversation

@QuangAnhLe

@QuangAnhLe QuangAnhLe commented Aug 4, 2026

Copy link
Copy Markdown

This PR fixes TodoIssueID

Implemented changes:

Adds automatic VSCode workspace settings import for Maven and Gradle projects. When a repository is imported, the Vscode.importRepository() method:

  • Detects whether the project uses Maven (pom.xml) or Gradle (build.gradle).
  • Merges the VSCode settings template from vscode/workspace/repository/.vscode/settings.json (in the settings repository) into the workspace's .vscode/settings.json.
  • Resolves environment variables (e.g. ${PROJECT_PATH}) in the template with the relative project path.
  • Creates the .vscode folder if it does not already exist.

Testing instructions

  1. Run the unit tests:
    mvn -Dtest="VscodeTest#testVscodeMvnRepositoryImport,VscodeTest#testVscodeGradleRepositoryImport" test -pl cli
  2. Both tests should pass, verifying Maven and Gradle project import.
  3. Run all VSCode tests to ensure no regression:
    mvn -Dtest="VscodeTest" test -pl cli
  4. Manual test (requires a settings repository with vscode/workspace/repository/.vscode/settings.json):
    • Clone a Maven or Gradle project into <IDE_HOME>/workspaces//.
    • Run ide import (or whichever command triggers importRepository).
    • Verify that /.vscode/settings.json has been created and contains the merged settings with resolved variables (e.g.
      ${PROJECT_PATH} replaced with the

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

Checklist for tool commandlets

Have you added a new «tool» as commandlet? There are the following additional checks:

  • The tool can be installed automatically (during setup via settings) or via the commandlet call
  • The tool is isolated in its IDEasy project, see Sandbox Principle
  • The new tool is added to the table of tools in LICENSE.asciidoc
  • The new commandlet is a command-wrapper for «tool»
  • Proper help texts for all supported languages are added here
  • The new commandlet installs potential dependencies automatically
  • The variables «TOOL»_VERSION and «TOOL»_EDITION are honored by your commandlet
  • The new commandlet is tested on all platforms it is available for or tested on all platforms that are in scope of the linked issue

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30911412186

Coverage increased (+0.04%) to 72.622%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 8 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

8 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/vscode/Vscode.java 8 83.87%

Coverage Stats

Coverage Status
Relevant Lines: 17286
Covered Lines: 13097
Line Coverage: 75.77%
Relevant Branches: 7657
Covered Branches: 5017
Branch Coverage: 65.52%
Branches in Coverage %: Yes
Coverage Strength: 3.22 hits per line

💛 - Coveralls

@QuangAnhLe QuangAnhLe added vscode Microsoft visual studio code enhancement New feature or request repository Commandlet to clone, build or import git repositories labels Aug 4, 2026
@QuangAnhLe QuangAnhLe moved this from 🆕 New to Team Review in IDEasy board Aug 4, 2026
@QuangAnhLe QuangAnhLe self-assigned this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request repository Commandlet to clone, build or import git repositories vscode Microsoft visual studio code

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

2 participants