Netbeans to IntelliJ: multiple source roots - how?

Hi everyone,
I downloaded IntelliJ 10.0 with the intent of giving it a quick try with my current project....but as on previous "quick try" attempts, I almost immediately get stumped :-(  Since there's still no import from Netbeans projects, I have to manually create a project/module with existing sources - IntelliJ asks me to specify the root source directory - but my Netbeans project consists of FOUR source trees (kept under $HOME/cvs/trunk/sourceTree1...sourceTree4)!  I have no clue how to communicate this to IntelliJ.  Can anyone point me to a document that describes, step-by-step, how one sets up an IntelliJ project/module with multiple Java source roots?

Please don't suggest that I change my project's source structure to fit into IntelliJ's single source root notion - this is a 10-year-old project that I can't change (plus Netbeans and Eclipse can handle multiple source roots, so I imagine IntelliJ can somehow too - it's just not obvious to me).

Sorry in advance if this question has been asked a million times.  But I did give the community search a thorough workout trying to find previous posts on this subject but, incredibly, could not find any.

Best regards,
Thomas Wolf

1 comment
Comment actions Permalink

Configure $HOME/cvs/trunk/ as the context root in Settings | Project Structure | Source (after selecting your module), then mark sourceTree1 ,,, sourceTree4 as Source using the Sources button on the right (if these directories are default java packages). Alternatively you can have multiple context roots for sourceTree1 ... sourceTree1 and "." (root of each context root) marked as Sources.

You can find more details in the documentation: http://www.jetbrains.com/idea/webhelp/configuring-content-roots.html.

0

Please sign in to leave a comment.