In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to use JetBrains IntelliJ IDEA 2019 for Mac. I hope you will get something after reading this article. Let's discuss it together.
JetBrains IntelliJ IDEA 2019 for Mac (Java platform IDE) 2019.2.4 Chinese active version
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.
1.1 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 subprojects in IDEA are called 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
2.1 Why do you need the default configuration when you have the current project configuration?
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".
2.2 initialization steps
Open the default configuration: top navigation bar-> File-> Other Settings-> Default Settings / ProjectStructs
Open the current configuration: top navigation bar-> File-> Settings / ProjectStructs
Example diagram:
If the current project wants to override the default configuration, just set it in Settins/Project Structure.
3. Global JDK (default configuration)
Specific steps: top toolbar File-> Other Settins-> Default Project Structure-> SDKs-> JDK
Example: set up the JDK directory according to the following steps, and finally click OK to save.
Note: the full name of SDKs is Software Development Kit because IDEA supports a variety of development kits such as JDK.
In the same way, the current project can set your favorite JDK version for the project and each module in Project Structure.
4. 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, it 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:
Settings.xml
Open the Maven artifact
Children's shoes who are still struggling with Update commands in Eclipse, 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.
5. Version Control Git/Svn (default configuration)
Specific steps: top toolbar File-> Other Settings-> Default Settings-> Version Control-> Git
Instructions for use: by default, IDEA integrates the support for Git/Svn to directly set up 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.
6. 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.
7. 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:
Small skills required for IDEA
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:
8. 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.
9. Remove case sensitivity
Specific steps:
File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None
Eliminate size sensitivity, when writing code, the automatic prompts of the code will be more comprehensive and rich.
10. 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:
11. Set the shortcut key to be 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.
Friends transferred from Eclipse can rest assured to use it.
twelve。 Open the common toolbar
Specific steps: top navigation bar-View-> check Toolbar & Tool Buttons
As shown in the following figure:
13. Keyboard shortcuts are necessary for lazy people
1. 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.
two。 Press [F2] to quickly modify the file name and bid farewell to the two-handed operation.
File- > Settings- > Keymap- > search Rename-> set the shortcut key to F2.
3. 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.
4. Press [Ctrl+ right mouse button] to open the implementation class directly to facilitate the development of queries.
File- > Settings- > Keymap- > search implementation- > Add Mouse Shortcut set the shortcut key to the Ctrl+ right mouse button.
14. Severe obsessive-compulsive disorder
1. Cancel case sensitivity and make automatic prompts more complete!
File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None.
two。 Hide the configuration directory of development tools such as * .idea;*.iml
File | Settings | File Types | add * .idea;*.iml at the end
3. Put away the comments to make the source code read more refreshing!
Check File-> Settings-> Editor-> General-> Code Folding-> Documentation comments.
To quickly open all comments with one click, right-click and select Folding-> Expand Doc comments.
15. IDEA Q & A
(1) how to open local / existing projects?
Answer: click File-> Open to open the project folder. Pay attention to configuring JDK, Maven and other basic configurations first.
(2) how does IDEA delete a project?
Answer: no need to delete. Click File- > Close Project to close the current project quickly.
(3) 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.
(4) how to add multiple modules to the current project?
Answer: right click on the project-> Select New-> Module-> usually select Spring Initializr, as shown below:
New module
Multi-module engineering
After reading this article, I believe you have a certain understanding of "how to use JetBrains IntelliJ IDEA 2019 for Mac". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.