I currently have two Intellij projects which each contain multiple modules. Project A uses project B as a library. The projects are maintained in separate git repositories.
I would now like to be able, to have the modules of both projects visible in the same "Project" tool window. Furthermore, changes in project B should be visible in project A.
I was able to successfully "add" project B to project A by importing the pom.xml of project B. I did this under "Project Structure" -> "Modules" -> "Import Module".
BUT: If I refactor (e.g. rename refactoring) a class in project B which is used in project A, project A won't be affected by the refactoring.
Is there a way to accomplish this?