Details the use interface of IntelliJ IDEA
As shown in the figure above, after opening IntelliJ IDEA, the first thing that greets us is this interface:
- Note 1 :
Create New Project
Create a new project; - Note 2 :
Import Project
Import an existing project; - Note 3 :
Open
Open an existing project; - Note 4 :
Check out from Version Control
The project can be checked out through the project address on the server (commonly known as: check out).
Here, in order to further introduce IntelliJ IDEA, we create a Static Web project, click Create New Project
to enter the following interface:
- Note 1 : Frameworks and languages supported by IntelliJ IDEA;
- 2 are denoted : the label 1 is further classified corresponding language or framework.
Here, we choose Static Web-->Static Web
, and then click Next
to enter the next step:
- Mark 1 : Project name (customized, generally lowercase, multiple words are connected by underscore);
- Note 2 : Project storage address;
- Note 3 : Module name (the same as the project name by default);
- Note 4 : Content root path;
- Note 5 : Module file storage address;
- Note 6 : Project format.
Here, there is little need to explain, that is: in IntelliJ IDEA, the Project
largest unit, there is no similar workspace for Eclipse ( Workspace
) concept, but one that we can Project
create more of the following Module
, a default is Project
created under a Module
, so The phenomenon that the project name is the same as the module name by default occurs . Under normal circumstances, we do not need More Settings
to make changes in the. Next, click Finish
to complete the creation of the project:
- Note 1 : Project structure diagram;
- Note 2 : When there is no content in the editing area, the commonly used shortcut keys are displayed by default.
For a new project created or opened for the first time, IntelliJ IDEA will create a project index. Large-scale projects may be stuck during the index creation process. Therefore, it is strongly recommended not to move the project during the creation of the index by IntelliJ IDEA. In addition, the default interface of IntelliJ IDEA is hidden Toolbar
and Tool Buttons
the bloggers prefer to show both. You can choose whether to enable it or not according to your personal preference. But no matter whether we choose to turn it on or not, we must know how to turn it on. When we want to turn it on, we don’t know how to turn it on. Isn’t that embarrassing? Therefore, here, we choose to open Toolbar
and Tool Buttons
click View
, as shown in the following figure:
As shown in the figure above, Toolbar
and the Tool Buttons
default is not selected, we click Toolbar
and respectively Tool Buttons
to open (the check mark appears):
- Mark 1 : Toolbar
- Note 2 : Tool Buttons
As shown in the figure above, Toolbar
and Tool Buttons
opened successfully! At this point, the introduction of the IntelliJ IDEA user interface is complete.
Modify the content of IntelliJ IDEA template comments
Observing the above picture, I don't know if you have noticed: IntelliJ IDEA has its own template comment function. As shown in the figure above, when creating a Java class, its own template annotation content is as follows:
/**
* Created by think on 2017/3/16.
*/
Settings
After viewing , we will find that its content comes from:
/**
* Created by ${USER} on ${DATE}.
*/
${USER}
: Represents the host name;${DATE}
: Indicates the time when the file was created.
Comparing the two, we found that: ${USER}
is set to think
; ${DATE}
is set to 2017/3/16
. Among them, there is ${DATE}
no problem, it means the time we created the class, but the ${USER}
setting think
is not so good! What should I do then? Don't say anything, just change it! Next, the blogger will demonstrate two ways to modify the user content in the template comments.
Make
Settings
changes in
As shown in the figure above, we locate the Editor > File and Code Templates
interface, and then select the Includes
middle File Header
, ${USER}
directly modify the name to our own definition, for example, the blogger sets it to 维C果糖
, and then click Apply
. Next, demo
create a test class in the directory, CeshiUser
and its effect is shown in the following figure:
As shown in the picture above, obviously our settings have taken effect!
bin
Modify theidea.exe
configuration file in the directory
As shown in the figure above, we opened the configuration file in the bin
directory in the IntelliJ IDEA installation directory idea.exe
and added a line of content -Duser.name=charies
. Next, save the configuration file, restart IntelliJ IDEA, demo
and create a test class in the directory CeshiUser2
. The effect is as shown below Shown:
As shown in the picture above, obviously our settings have taken effect! But here, there are two points to note, that is:
- ① When
idea.exe
modifying the user content in the template comment in the configuration file, we cannot set it to Chinese, otherwise there will be garbled Chinese characters. - ② After modifying the
idea.exe
configuration file, you need to restart IntelliJ IDEA. Only after restarting, the latest configuration can take effect.