Skip to content

Automatic project import for IntelliJ #1166

@hohwille

Description

@hohwille

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).

Metadata

Metadata

Labels

enhancementNew feature or requestintellijIntelliJ IDE from Jet-BrainsrepositoryCommandlet to clone, build or import git repositories

Projects

Status

🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions