Among the two ides, the shortcut keys I use most frequently are:
Most of the time, we are editing a file, but we also need to edit other files. If FF class is a frequently edited class and needs to edit other classes in the same package at the same time, you can quickly switch between classes in the same package through the function of link editor. What kind of convenience does this function provide for us? Whenever a file is edited, it immediately displays its location in the package browser view / project view. If you use the expanded package view, it will divide and display the classes according to their functions, instead of displaying the classes in a hierarchical way (Dao layer, service layer, etc.). This is also the way I strongly recommend to show, because it’s really convenient.
In the project view or package view, you can see and use the link to editor buttons.
If you do not want to use this function, you can still use the ALT + Shift + W shortcut to view the package view or drawing view and set its display position.
Select settings in the project view or package view, and then check the autoscroll from source function;
If you don’t want to use this function, you can still use the shortcut Alt + F1 to navigate and set the display position;
Automatic completion makes ide better than Notepad, and context aware idea has made a qualitative leap in this field. For example, let’s start with the following line of code:
Now we want to find out which options start with vim.
How does idea do it? Without waiting for any key, it can immediately understand that findelement needs an example of the conditionaion class as the second parameter, and there is a static variable named visible in the condition class. Idea will directly recommend the only valid option.
However, what does eclipse do? Alas, it doesn’t understand the context. It doesn’t know that the cursor is in the second parameter of the assertelement method. So when you press “holy” Ctrl + space, eclipse will simply display everything that starts with VI in the whole world.
In a beautiful pop-up box, I saw a lot of beautiful highlighted format specification useless information（
Speaking of memory, idea seems to consume more memory than eclipse. I don’t have a representative benchmark in this area, but I know that the 16 GB ram in my family is too small for developing large projects, but I haven’t changed it. But it doesn’t get in the way. Since the third technological revolution, human beings have been trading space for time and storage cost for efficiency. This is a trend. In the future, apps and ides will become bigger and bigger (but it doesn’t mean slower and slower)
I also have this feeling when I use mongodb, that is, the more advanced IDE and more powerful app are at the cost of memory
The charm of IntelliJ
Many functions are set by default
IntelliJ itself comes with many functions (such as the integration of GitHub). Of course, in eclipse, you can also get enough functions by selecting different versions of plug-ins, but you need to configure these plug-ins yourself.
Use the mouse wheel to change the font size
In IntelliJ, you can use the mouse wheel to change the font size (which I often use in browsers). But this function needs to be activated manually.
- Open ide settings (Ctrl + Shift + s or click File Menu > setting)
- On the editor page (enter “editor” in the search box), make sure that the option change font size (zoom) with Ctrl + mousewheel is selected.
Starting command line terminal directly in IDE
Use shortcut: Alt + F12
Flexible and easy to use template
Enter P and use the shortcut key Ctrl + J to get the following options:
- psf – public static final
- psfi – public static final int
- psfs – public static final String
- psvm – main method declaration
Disadvantages compared with eclipse IntelliJ
Unable to maximize console
In eclipse, you can use the CTRL + m shortcut or double-click the tab to maximize the current console. But there’s no similar way to do it in IntelliJ.
Mouse over to display Javadoc
Of course, in IntelliJ, you can use the CTRL + Q shortcut to get the above functions. But when you hover over the code, you can see that some Javadoc functions are so friendly in eclipse.
To sum up
There’s a lot of debate about which of them has more plug-ins, shortcuts, etc. There are so many differences between them that it’s hard to decide what’s most important. Therefore, people say that the two ides are similar in functionality, and choosing one is a matter of personal preference.
However, with the development of the times, IntelliJ idea will be better than eclipse. Let alone that the development team of eclipse has seriously lagged behind, idea itself has the advantage of getting rid of all historical burdens. This is why Google chose to develop Android studio and other environments on idea, and I also slowly turned to jetbrain series ecological environment, With the idea market surpassing eclipse, we’d better try new tools bravely
Zero basic learning Java, technical exchange and discussion, I recommend my:Java learning garden, more Java technology summary data sharing, development experience sharing.