久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Content Root

 小胡子的是也 2015-09-20

Content Root

On this page:

Basics

Content root is a folder that contains all the files that make up your module.

A module can have more than one content root, however, in most of the cases one content root will suffice. (In certain situations, the modules without content roots may be useful.)

Content roots in IntelliJ IDEA are shown as moduleFolder or folder.

See also, Configuring Content Roots.

Types of content roots

By default, all the files in a content root folder are involved in indexing, searching, parsing, code completion, etc. To change this status, folders within a content root can be assigned to the following categories:

  • Source roots (or source folders; shown as rootSource).

    By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders contain source code that should be compiled as part of the build process.

    In Java modules, the subfolders within the source roots represent your Java package structure.

    You can assign a package prefix to a source root (e.g.com.mycompany.myapp) instead of creating the corresponding folder structure within that source root (e.g.com/mycompany/myapp). For more information, see Package prefix for Java source roots.

    In the absence of the package prefix and the subfolders, a source root would represent the default package (an unnamed package).

  • Generated source roots (or generated source folders; shown asrootGeneratedSourceIJ; in certain views the [generated] text marker is used) are similar to source roots. The difference is that the generated source roots are not suggested as target folders when performing the Move Class refactoring or using theCreate Class from Usage quick fix.
  • Test source roots (or test source folders; shown as rootTest).

    These roots are similar to source roots but are for code intended for testing (e.g., for unit tests). Test source folders let you keep the code related to testing separate from the production code.

    Compilation results for sources and test sources, normally, are placed into different folders.

  • Generated test source roots (or generated test source folders; shown as rootGeneratedTestSourceIJ; in certain views the [generated] text marker is used) are similar to test source roots. The difference is the same as between the source roots and the generated source roots.
  • Test resource roots (or test resource folders; shown as rootTestResourceIJ; available only in Java modules) are for resource files associated with your test sources. In all other respects, these folders are similar to resource folders.
  • Excluded roots (marked as rootExcluded) are ones that IntelliJ IDEA "partially ignores".

    Very limited coding assistance is provided for files in excluded folders. Classes contained in excluded folders don't appear in code completion suggestion lists, references to such classes are shown in the editor as unresolved. When searching, IntelliJ IDEA doesn't look in excluded folders, etc.

    Making the folders whose contents are "less important" excluded may improve the IDE performance.

    Normally excluded are compilation output folders.

  • Resource roots (or resource folders; marked as rootResourceIJ).

    These roots are available only in Java modules) are for resource files used in your application (images, various configuration XML and properties files, etc.).

    During the build process, all the contents of the resource folders are copied to the output folder as is.

Modules without content roots: Collections of dependencies

A module can be used solely as a collection of dependencies for other modules. In such cases, instead of specifying the necessary dependencies separately, you can add the dependency on the corresponding module.

A module used for such purpose, obviously, doesn't need a content root.

Package prefix for Java source roots

A package prefix specifies which Java package corresponds to a folder and can be assigned to the following categories of the Java source roots:

  • Sources
  • Generated sources
  • Test sources
  • Generated test sources

If specified, the package prefix acts as an equivalent of the corresponding folder structure which has to be created otherwise.

To illustrate, let's assume you are going to work with the com.mycompany.myapp package. In the absence of the package prefix, you would create the folder structure com/mycompany/myapp in the corresponding source root folder (e.g. src).

The alternative would be to assign com.mycompany.myapp to src as its package prefix and store the corresponding classes right in src.

See Also

Last modified: 14 July 2015 

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請點(diǎn)擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多