In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to use the IntelliJ IDEA tutorial, the content is very detailed, interested friends can refer to, hope to be helpful to you.
one。 Preface
If IntelliJ IDEA is a modern intelligent development tool, Eclipse can be called a Stone Age thing. In fact, the author is also an explorer from Eclipse to IDEA, with the recent continuous development practice and debugging, gradually realize the great development convenience brought by this intelligent IDE, under the support of powerful plug-in features, such as Git and Maven support simply can not stop, a variety of code tips, including JS is easy to come by, and finally had to be impressed by this magical IDE. In order to get more friends around me to participate, I decided to write this article and share it with you. (^ _ ^)
Advanced Portal: IntelliJ IDEA official website download-Ultimate Ultimate Edition
Activation method: select active code after installation and enter the activation code.
two。 Text: IntelliJ IDEA usage tutorial 1. Comparison of IDEA VS Eclipse core terms
As can be seen from the following figure: the biggest change between the two is the change in the concept of the workspace, and in IDEA, Project and Module are two different concepts that are of great significance to the project structure, which is exactly what bothers many IDEA beginners.
Why cancel the workspace?
A: simply put, IDEA does not need to set up a workspace, because every Project has a workspace! For each IDEA project project (Project), each of its sub-modules (Module) can be configured with separate JDK and MAVEN. This adds great convenience to the refactoring of traditional projects to new projects, and this diversified flexibility is exactly what Eclipse lacks, because Eclipse has tied up the workspace when it was first used.
In addition, many beginners will ask, why do subprojects in IDEA become Module?
A: in fact, it is the concept of modularization. As an aggregation project or a common root directory, it is called Project, and the following sub-projects are called modules, and each sub-module can be associated with or without any relationship.
two。 Current project configuration VS default configuration
Why do you need the default configuration when you have the current project?
A: because IDEA has no concept of workspace, each new project (Project) needs to set its own JDK, MAVEN and other related configurations. This increases flexibility, but it has to be reconfigured for each new project, which is obviously not in line with our expectations. In this context, the default configuration provides the Default option for the current project configuration, and the problem is solved.
Latest addition: in order to clarify the concept of this new project configuration, the official version after 2018.2 has formally changed the name of "Default Settings" to "Default Settings / ProjectStructs", that is, "default configuration" means "new project configuration".
Initialization step
Open the default configuration: top navigation bar-> File-> Other Settings-> Default Settings / ProjectStructs; open the current configuration: top navigation bar-> File-> Settings / ProjectStructs
If the current project wants to override the default configuration, just set it in Settins/Project Structure.
Global JDK (default configuration)
Specific steps: top toolbar File-> Other Settins-> Default Project Structure-> SDKs-> JDK
Note: the full name of SDKs is Software Development Kit, because IDEA supports various development kits such as JDK
Global MAVEN (default configuration)
Specific steps: top toolbar File-> Other Settings-> Default Settings-> Build & Tools-> Maven example: theoretically, as long as the Maven home directory is configured, the actual development is recommended to use User Settins file.
As a reminder, the address of the Apache Maven local warehouse is automatically generated, usually in the user directory of disk C, so it is recommended that you specify the address of the local warehouse in the actual development to avoid data loss due to reinstallation of the system or cleaning up by third-party security tools. The configuration of Maven is simple, and you can see it at a glance when you delete the comments. As shown in the figure:
Maven artifact is still in Eclipse struggling children's shoes using Update commands, please try the Maven plug-in provided by IDEA as soon as possible, the convenience of its operation will bring you an unprecedented sense of pleasure! Specific steps: right toolbar Maven-> Click to expand a project or module-> Quick execute the Maven command.
Version Control Git/SVN (default configuration)
Specific steps: top toolbar File-> Other Settings-> Default Settings-> Version Control-> Git instructions: by default, IDEA integrates the support for Git/Svn to directly set the execution program, and the Test prompt on the right is successful. Problem feedback: some partners reported that IDEA could not find svn.exe. The solution: reinstall SVN and re-select command line client tools in the configuration item.
PS: IDEA's built-in Git plug-in is easy to use, especially for conflict-solving code. In addition, SourceTree is recommended for Git clients.
Automatic guided package and intelligent removal (default configuration)
Specific steps: top toolbar File-> Other Settings-> Default Settings-> Auto Import instructions: on the Internet, I saw a lot of people asking why IDEA can't optimize the guide package while Eclipse can. This is not low-end black, so I took it out to share with you how IDEA optimizes the guide package.
Tomcat Server (current project configuration)
Many partners cannot find the configuration of Tomcat at the beginning. In fact, it is very simple. Tomcat or Jetty are all containers for deployment. Naturally, you will think of Deployment. When you open the deployment configuration, you can see the configuration of the application server. Configure Tomcat method: File-> Settings-> Deployment-> Application Servers-> Tomcat Server specific configuration method, as shown below:
3. IDEA must have small skills
In order to improve the efficiency of development, we have prepared the following tips for you to use the five stars in the practical index:
Automatic compilation
Specific steps: top toolbar File-> Other Settings-> Default Settings-> Auto Import description: after automatic compilation is enabled, combining with Ctrl+Shift+F9 will have a hot update effect.
Automatic compilation (Runtime)
Specific steps: click Ctrl + Shift + Alt + / and then double-click Shift search to enter Registry, find compiler.automake.allow.when.app.running, and check above.
Remove case sensitivity
File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None cancels size sensitivity. When writing code, the automatic prompts of the code will be more comprehensive and rich.
Adjust font type and font size
The default white background and small fonts will affect everyone's coding experience, here specially provides a quick configuration to adjust the code window. Open the configuration, search Font, and then Font can adjust the font type, and Size can adjust the font size, as shown in the figure:
Set the shortcut keys the same as Eclipse
Many people may not be accustomed to IDEA shortcut keys, for convenience, we set the shortcut keys to be the same as Eclipse. Specific steps: File-> Settings-> Keymap-> Select Eclipse.
Open the common toolbar
Specific steps: top navigation bar-View-> check Toolbar & Tool Buttons
4. Keyboard shortcuts are necessary for lazy people
Press the [middle mouse button] to quickly open the smart prompt to replace alt+enter
File- > Settings- > Keymap- > search Show Intention Actions-> add the shortcut key as the middle mouse button.
Press [F2] to quickly modify the file name and bid farewell to two-handed operation.
File- > Settings- > Keymap- > search Rename-> set the shortcut key to F2.
Press [F3] to directly open the directory where the file is located and browse it in one step.
File- > Settings- > Keymap- > search Show In Explorer-> set the shortcut key to F3.
Press [Ctrl+ right mouse button] to directly open the implementation class to facilitate the development of queries.
File- > Settings- > Keymap- > search implementation- > Add Mouse Shortcut set the shortcut key to the Ctrl+ right mouse button. 5. Severe obsessive-compulsive disorder
Cancel case sensitivity and make automatic prompts more complete!
File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None.
Hide the configuration directory of development tools such as .idea; .iml
File | Settings | File Types | add * .idea;*.iml at the end
Put away the comments to make the source code read more refreshing!
Check File-> Settings-> Editor-> General-> Code Folding-> Documentation comments. If you want to quickly open all comments, right-click and select Folding-> Expand Doc comments6. IDEA ten questions and ten answers
How to open a local project / existing project
Answer: click File-> Open to open the project folder. Pay attention to configuring JDK, Maven and other basic configurations first.
How does IDEA delete a project project?
Answer: the Coder that asks this question is really lovely, , answer you definitely, do not need to delete, click File- > Close Project to quickly close the current project; example: what? You still want to kill the whole catalog? That is also wide, right-click Show In Explorer and delete the folder. However, the author suggests that it is better to turn off Close directly, in case it can be used in the future, what do you think?
How to open multiple Maven projects in a single window?
A: casually create a new folder, then throw all the projects in, and use IDEA to open this folder.
How to add multiple modules to the current project?
Answer: right click on the project-> Select New-> Module-> usually select Spring Initializr, as shown in the figure
List of InteliiJ IDEA shortcut keys
On the use of IntelliJ IDEA tutorials is how to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.