Any project contains at least one content root created together with the project.
You can create additional content roots as well as remove the unnecessary ones.
In this section:
- Open the Project Structure settings.
- In the Projects pane of the Project Structure page, click the project you want to configure content roots for.
-
In the Content roots of the Project Structure page,
click the Add Content Root button
.
- In the dialog that opens, locate the desired directory and click OK.
- Open the Project Structure settings.
- In the Projects pane of the Project Structure page, click the project you want to configure content roots for.
- In the Content roots pane of the Project Structure page, select the content root to be deleted.
- Click the Remove Content Entry button
.
- Confirm deletion.
Here is how you assign a folder to a different category. In a similar way, you can assign a folder to any other category.
- Open the Project tool window (e.g. ).
- Select the folder that you want to assign to test sources.
- In the context menu, point to Mark Directory As and select the desired category.
In a similar way you can change the folder category at a later time. (Just select a different category from the context menu.)
To cancel the folder association with its current category (i.e. to make a folder an "ordinary" folder ),
select Unmark as <current_category> Root
(e.g. Unmark as Test Sources Root).