2

I'd like to work on two projects simultaneously. Project A is kind of the core of Project B, but also more general. As I want to work on both at the same time, but let them be distinct (Project A will be used for other Projects as well) I'm kind of struggling on how to setup Project A as a dependency of Project B while also maintaining the ability to edit Project A's files during working on Project B.

I assume the following folder setup:

-projects

-- A (Core)

-- B (Special)

How can I add A into B?

edit: We are talking SBT/non-sbt and only local projects here. One project (the older one/dependency) doesn't use SBT, while the new one (dependent) should.

I just want both projects in the same window so I can add new classes to the core and edit stuff as well without having to recompile everything again and jumping between windows.

Community
  • 1
  • 1

1 Answers1

2

You could set up a single project with multiple modules. Also see this: IntelliJ: Working on multiple projects

Community
  • 1
  • 1
lbalazscs
  • 17,474
  • 7
  • 42
  • 50
  • 1
    But is this the right thing to do? Or should I (as mentioned in your link) open a project and "add to current project"? –  Aug 21 '15 at 08:12
  • The accepted answer says to use modules, like I said. The highest-voted answer allows you to have multiple projects in the same window - but it seems that internally Idea adds the new project as a module (see the project structure window). So if you use Maven, the highest-voted answer is nothing but an easy way to set up dependent modules from existing projects. – lbalazscs Aug 21 '15 at 12:49
  • The accepted answer is a few years older than the newer one, which is why I asked ;) Also I do not use or plan to use maven with these projects. –  Aug 21 '15 at 12:59