I am a newcomer finding my way around the IntelliJ IDE, for which I am currently using for coding in Scala.
Right clicking in the Project window brings up a pop-up, with "Mark Directory As ..." as an option, with the following choices:
Can I know would I use the "Mark Directory As ..." option? And also what would each of the choices do? I have tried looking around, but so far most websites have been rather vague with their explanations.
Thanks for your help.
In Pycharm, if you right click in a folder inside your project, you can mark it as sources root , so then you can import modules from this folder and subfolders.
Configuration directory The IntelliJ IDEA configuration directory contains user-defined IDE settings, such as keymaps, color schemes, custom VM options, platform properties, and so on. Windows. macOS.
From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Modules. Select the necessary module and open the Sources tab. to the right of the necessary folder (folder path). Specify the path relative to the output folder root, and click OK.
Lets go through the options:
src/main/scala
(though you can change that, or add extra source directories in your build). Directories nested below this level should be packages. Intellij needs to know these are sources so it can highlight them, check them for errors, etc.main
sources..sql
fixtures, etc.If you're using SBT you might not have to use "Mark directory as..." manually much at all, since the Intellij SBT plugin has grown smarter about inferring source, resources, and generated source directories automatically from the build.sbt
file.
It's worth noting that Intellij plugins can add additional options to the "Mark directory as..." menu - for example, the Python plugin has a "Template Folder" option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With