Configuring Folders Within a Content Root
In this section:
Within a content root, RubyMine can distinguish between the folders that contain source code, and the ones to be ignored while searching, parsing, watching etc. To do so, you can mark any folder below a content root as a source folder, or as excluded so it becomes invisible for RubyMine.
You can assign a folder to a category in two different ways:
To mark directories under the content root via the project structure
- 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, click the desired content root. The directories under this content root are displayed as a tree view.
- Select the directory you want to mark and do one of the following:
- Click one of the icons on top to assign the desired status to this directory.
- Choose the corresponding status command on the context menu of the directory.
- Press Alt+<first letter of the directory status> (for example, Alt+E for the excluded roots, or Alt+S for the source roots).
- Open the Settings / Preferences Dialog by choosing for Windows and Unix or for OS X. Click the Directories node.
- In the Directories page, click the desired content root. The directories under this content root are displayed as a tree view in the right-hand pane.
Select the directory you want to mark and do one of the following:
- To have RubyMine consider the contents of the selected folder as unit tests, click the Tests toolbar button or choose Test Sources on the context menu of the selection.
- To have RubyMine ignore the selected directory during indexing, parsing, code completion, etc., click the Excluded toolbar button or choose Excluded on the context menu of the selection.
- To enable RubyMine to complete relative paths to resources under the selected folder, click the Resource Root toolbar button or choose Resource Root on the context menu of the selection.
To mark directories using the context menu:
- Right-click the desired directory in the Project Tool Window.
- On the context menu, point to Mark Directory As node.
- Choose Mark as <directory status>.
To return a folder to its regular status, do one of the following
In the Project Structure Dialog:
- Select the directory in question in the list of folders under the content root, and click :
- Click the folder's status icon once more.
- Choose the corresponding command on the context menu of the directory.
- In the Project Tool Window, right-click the desired directory, point to Mark Directory As node, and then choose Unmark as <directory status>.