Introducing Icons for Common File Types in IntelliJ IDEA

In the previous "  Easiest IntelliJ IDEA Tutorial Ever  " series of blog posts, we have learned a lot about IntelliJ IDEA, such as installing IntelliJ IDEA on Windows, running IntelliJ IDEA, creating Java projects, and modifying IntelliJ IDEA themes Wait, it can be said that we have initially mastered the use of IntelliJ IDEA! However, there is a phenomenon I don't know if you have noticed, that is: when we use IntelliJ IDEA to create a file, the icons displayed are different depending on the file type. For example, we create Java, Interface, Enum and JavaScript files respectively, as shown in the following figure:

1

As shown in the figure above, obviously different file types display different icons. In order to better grasp IntelliJ IDEA, here, let's go a step further and learn about the icons of various file types in IntelliJ IDEA, which are mainly divided into three categories: Common, Data Sources and File Types.

Common

2
3
4
5

Data Sources

6
7
8

File Types

IntelliJ IDEA recognizes numerous file types, each represented by a special icon, and also allows custom file types. Each file type is associated with one or more specific schema extensions. File types and their extensions can be configured in the file type's dialog. Default file types include:

9
10
11
12
13
14
15
16
17

For the icons of various file types, the above Descriptionhas been introduced in great detail, but there are two icons that need special explanation, namely:

  • 111Source root, we can understand it as the source directory, which is used to store Java class files exclusively. Compared with the compiled class files, it is the source. Generally, the directory named by default srcis the source directory, but in IntelliJ IDEA, even if it is called, it srcscan be set to Source root, so the source directory has nothing to do with the directory naming, because IntelliJ IDEA supports setting any directory to Source root, its role is to mark the The files in the directory are compilable.
  • 222Java class located out of the source root, we already know that Source rootthe directory is used to tell IntelliJ IDEA that this is the directory where the compilable files are stored, and if our Java class file is not placed in this directory or a subpackage of this directory, then the Java class file cannot be compiled. , the icon will appear in front of it.

———— ☆☆☆ ——Back-  >The easiest IntelliJ IDEA tutorial in history<- Contents——  ☆☆☆ ————

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325810215&siteId=291194637