intellij-sdk-code-samples/topics/basics/project_structure.md
Jakub Chrzanowski 4e802980f2
Webhelp migration (#347)
* [webhelp] Fixes for TXP00152, TXP00002, test build 27 Jul 22:26

* [webhelp] Fixes for Part #4 TXP00010, EXCEPT decimal numbers in section titles

* [webhelp] Fixes for Part #5 TXP00017

* [webhelp] Fixes for Part #4 TXP00010 - removed numbers from page section titles in "Custom Language Support Tutorial" and "Testing a Custom Language Plugin".

* [webhelp] Removed numbers from page section titles in rest of project *.md files.

* [new webhelp] Build #44 changes

* [new webhelp] Maintenance merge from master

* [new webhelp] Add placeholder file for webhelp import.

* [webhelp] Correct redirects for file name changes

* [webhelp] TOC not needed in webhelp

* [format] {:toc} not needed for webhelp

* add {:disable-links} to ensure demo links are not interpreted as real links.

* Put all badges on the same line to simplify composition.

* formatter.md: fix upsource link

* fix some links

* api_changes_list.md: remove note

* migrate to webhelp - initial

* fix GH edit URL

* remove sdkdocs-template setup in VCS config

* remove recently_updated.md

* restore COC/CONTRIBUTING.md

* api_changes_list.md: remove note

* useful_links.md: IPE

Co-authored-by: JohnHake <john.hake@jetbrains.com>
Co-authored-by: Yann Cébron <yann.cebron@jetbrains.com>
2021-01-14 16:07:39 +01:00

64 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[//]: # (title: Project Structure)
<!-- Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<!--TODO split into parts accordingly to the table of contents-->
This topic considers the concept of projects based on the IntelliJ Platform and related subjects, such as _modules_, _facets_, _libraries_, and _SDK_.
The project structure and Java classes available to manage projects and modules are discussed.
> Internal changes related to a significant redesign of the representation of project models are included in 2020.3 release; please see [blog post](https://blog.jetbrains.com/platform/2020/10/new-implementation-of-project-model-interfaces-in-2020-3/) for details. This shouldnt affect any plugins using the IntelliJ API properly and which dont access internal classes.
>
{type="note"}
## Project and Its Components
This section briefly discusses the IDEA project structure, project components, and related terms.
For more information about projects and their components, refer to [Project](https://www.jetbrains.com/help/idea/about-projects.html), [Module](https://www.jetbrains.com/help/idea/creating-and-managing-modules.html), [Library](https://www.jetbrains.com/help/idea/working-with-libraries.html), [Facet](https://www.jetbrains.com/help/idea/adding-support-for-frameworks-and-technologies.html#facets) in the IntelliJ IDEA Web Help.
### Project
In the IntelliJ Platform, a _project_ encapsulates all of a project's source code, libraries, and build instructions into a single organizational unit.
Everything done using the IntelliJ Platform SDK is done within the context of a project.
A project defines collections referred to as _modules_ and _libraries_.
Depending on the project's logical and functional requirements, you can create a _single-module_ or a _multi-module_ project.
### Module
A _module_ is a discrete unit of functionality that can be run, tested, and debugged independently.
Modules include such things as source code, build scripts, unit tests, deployment descriptors, etc.
In a project, each module can use a specific SDK or inherit the SDK defined at the project level (see the [SDK](#sdk) section below in this document).
A module can depend on other modules of the project.
### Library
A _library_ is an archive of compiled code (such as JAR files) on which modules depend.
The IntelliJ Platform supports three types of libraries:
* **Module Library**: the library classes are visible only in this module, and the library information is recorded in the module's `.iml` file.
* **Project Library**: the library classes are visible within the project, and the library information is recorded in the project's `.ipr` file or in `.idea/libraries`.
* **Global Library**: the library information is recorded in the `applicationLibraries.xml` file in the `~/.IntelliJIdea/config/options` directory.
Global libraries are similar to project libraries but are visible for different projects.
For more information about libraries, refer to [Library](https://www.jetbrains.com/help/idea/working-with-libraries.html).
### SDK
Every project uses a Software Development Kit (_SDK_).
For Java projects, SDK is referred to as JDK (Java Development Kit).
The SDK determines which API library is used to build the project.
If a project is multi-module, the project SDK is common for all modules within the project by default.
Optionally, a project can configure an individual SDK for each module.
For more information about SDKs, see [Working with SDKs](https://www.jetbrains.com/help/idea/working-with-sdks.html) in the IntelliJ IDEA Web Help.
### Facet
A _facet_ represents a certain configuration, specific for a particular framework/technology associated with a module.
A module can have multiple facets.
E.g., Spring-specific configuration is stored in a Spring facet.
Facets are documented under [Facet](https://www.jetbrains.com/help/idea/adding-support-for-frameworks-and-technologies.html#facets) and [Language and Framework Specific Guidelines](https://www.jetbrains.com/help/idea/language-and-framework-specific-guidelines.html) in the IntelliJ IDEA Web Help.
## Additional Information
For more information on each of these entities, see:
- [Project](project.md)
- [Module](module.md)
- [SDK](sdk.md)
- [Library](library.md)
- [External system integration](external_system_integration.md) (for projects imported from Gradle or similar build systems)