Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic project import for VSCode #1167

Open
hohwille opened this issue Mar 25, 2025 · 0 comments
Open

Automatic project import for VSCode #1167

hohwille opened this issue Mar 25, 2025 · 0 comments
Labels
enhancement New feature or request repository Commandlet to clone, build or import git repositories vscode Microsoft visual studio code

Comments

@hohwille
Copy link
Member

hohwille commented Mar 25, 2025

As described in #1164 we want to have automatic project import also for VSCode.

Hint: via repository configuration and by setting import=vscode this feature should be triggered.

Currently it is not implemented at all.

public void importRepository(Path repositoryPath) {
throw new UnsupportedOperationException("Repository import is not yet implemented for IDE " + this.tool);
}

In VsCode class this method needs to be overridden and implemented properly.

I could not find any CLI feature in VSCode to archive this. Therefore this task is a little tricky.
My suggestion would be to do that manually:

  1. Create a backup of your workspaces/main/.vscode
  2. Open your VsCode (ide vscode)
  3. Manually import the project as Maven project (or for gradle in case of build.gradle).
  4. Check that your project is now properly recognized and build by VsCode (what we consider as "imported")
  5. Close your VsCode
  6. Do a recursive diff of the backup (from step 1.) with the current state of the VsCode config in your workspace
  7. Identify the relevant difference(s) in the config file(s)
  8. Implement the importRepository method to apply that changes in the according VsCode configuration file(s).
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Mar 25, 2025
@hohwille hohwille changed the title VSCode Automatic project import for VSCode Mar 25, 2025
@hohwille hohwille added enhancement New feature or request vscode Microsoft visual studio code repository Commandlet to clone, build or import git repositories labels Mar 25, 2025
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: 🆕 New
Development

No branches or pull requests

1 participant