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 IntelliJ #1166

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

Automatic project import for IntelliJ #1166

hohwille opened this issue Mar 25, 2025 · 0 comments
Labels
enhancement New feature or request intellij IntelliJ IDE from Jet-Brains repository Commandlet to clone, build or import git repositories

Comments

@hohwille
Copy link
Member

hohwille commented Mar 25, 2025

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

Hint: via repository configuration and by setting import=intellij 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 Intellij class this method needs to be overridden and implemented properly.

I could not find any CLI feature in IntelliJ 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/.intellij and workspaces/main/.idea folders
  2. Open your IntelliJ (ide intellij)
  3. Manually import the project by right-clicking the pom.xml in your repository folder inside the workspace (workspaces/main/«my-repo»/pom.xml) and selecting + Add as Maven project from the context menu - in case we want to support this first for maven (for gradle use build.gradle).
  4. Check that your project is now properly recognized and build by IntelliJ (what we consider as "imported")
  5. Close your IntelliJ
  6. Do a recursive diff of the backup (from step 1.) with the current state of the IJ 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 intellij 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 IntelliJ Automatic project import for IntelliJ Mar 25, 2025
@hohwille hohwille added enhancement New feature or request repository Commandlet to clone, build or import git repositories intellij IntelliJ IDE from Jet-Brains 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 intellij IntelliJ IDE from Jet-Brains repository Commandlet to clone, build or import git repositories
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant