Transferred from: http://www.weste.net/2015/04-26/102981.html
IntelliJ idea and Eclipse compare, which is better?2015-04-26 11:00:57 Source: importnewdony.xu translation
In my opinion, every IDE is great,IntelliJ looks more modern , but sometimes I like the classic version of Eclipse, probably because I used to use eclipse a lot. May continue to be affected by this factor in the future.
As a veteran eclipse user, I want to take a more rigorous look at IntelliJ idea. JetBrains staff were very friendly and gave me an open source license for the podcastpedia.org and codingpedia.org projects. In this article, I list some of the actions that are commonly used in eclipse and are equivalent to IntelliJ. Write this article in order to later forget to be able to make a record, also may be able to help other people.
Shortcut keys
You have to say it beforehand! The following table lists the shortcut keys I use most frequently among the two Ides:
Describe |
Eclipse |
IntelliJ |
Code completion |
Ctrl+space |
Ctrl+space |
Open Class or interface (Two Ides support the use of the "camel character" prefix to filter the lookup list, which makes it easy to complete the search; For example, you can use "Podi" to retrieve the Podcastdaoimpl class) |
Ctrl+shift +t |
CTRL + N |
Quickly open files/resources |
Ctrl+shift+r |
Shift+f6 |
Open declaration |
F3 |
Ctrl+b |
View javadoc/Details |
Mouse over (F2 focus) |
Ctrl+q |
Quick fix |
Alt+1 |
Alt+enter |
Import all the required packages |
Ctrl+shift+o |
Ctrl+alt+o |
Save File/Save All Files |
Ctrl+s/ctrl+shift+s |
Auto Save |
Current file Quick Position popup (member, method) |
Ctrl+o |
Ctrl+f12 |
Source (Generate getter and setter, constructor, etc.) |
Alt+up/alt+down |
Alt+insert |
Current syntax completion Correct syntax constructs such as If,do-while,try-catch,return (method invocation) (e.g., adding parentheses) |
|
Ctrl+shift+enter |
Extracting constants |
Ctrl+1-> Solid Extraction |
Ctrl+alt+c |
Extracting variables |
Ctrl+1-> Extracting variables |
Ctrl+alt+v |
Add, delete, and move several lines of code |
Adds a row to the current caret |
Shift+enter |
Shift+enter |
Copy a line or code snippet |
Ctrl+alt+up/down |
Ctrl+d |
Delete a line of code |
Ctrl+d |
Ctrl+y |
Select code to move up or down |
Alt+up/down |
Shift+alt+up/down |
Find/Search |
Find a class/variable to use in a workspace or project |
Ctrl+shift+g |
Alt+f7 |
Find text in a project or workspace |
Ctrl+h (select File search) |
Ctrl+shift+f |
Navigation |
Fallback (undo last navigation action) |
Alt+left |
Ctrl+alt+left |
Navigating between labels/edits |
Ctrl + Page Down/up |
Alt + Left/alt + Right |
Jump to a row |
Ctrl+l |
Ctrl+g |
Navigate to the nearest file |
Ctrl + E |
Ctrl + E |
quick way to switch between editors |
|
Alt + Up/down |
Debugging |
Run a row |
F6 |
F8 |
Go to the next calculation |
F5 |
F7 |
Run to the next breakpoint |
F7 |
Shift+f8 |
Reply Run |
F8 |
F9 |
Link Editor
Many times we are editing a file and need to edit other files as well. If the FF class is a class that is often edited and needs to be edited by other classes in the same package-the function of the link editor allows you to quickly switch between classes in the same package. What kind of convenience does this feature offer us? Whenever you edit a file, it immediately shows where it is in the Package browser view/Project view. If you use the expanded package view, it divides and displays classes by function, rather than using hierarchies (DAO layers, service layers, and so on) to present classes. This is also my highly recommended way of showing, because it is really convenient.
Eclipse
You can see and use the Link Editor button in the project browse view or the package browse view .
If you do not want to use this feature, you can still use the Alt+shift+w shortcut to view the package view or the drawing view and set its display position.
IntelliJ
Select settings in the Project view or package view, then tick auto-scroll (autoscroll from source) based on source;
If you do not want to use this feature, you can still use the shortcut key ALT+F1 to navigate and set the location of the display;
The charm of IntelliJ a number of features are set by default
IntelliJ itself comes with a multitude of features (e.g., GitHub integration). Of course, at Eclipse you can also get enough functionality by choosing a different version of the plugin, but you need to configure these plugins yourself.
Use the mouse wheel to change the font size
In IntelliJ, you can use the mouse wheel to change the font size (I use this feature frequently in my browser). However, this feature requires manual activation.
- Open the IDE's settings (Ctrl+shift+s or click on the File menu >setting)
- On the editor page (enter "editor" in the search box), make sure that the change font size (Zoom) with CTRL+MOUSEWHEEL option is selected.
Start the command line terminal directly in the IDE
Using shortcut keys: Alt + F12
Flexible and easy-to-use templates
Enter P, and then 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
Strong support for JavaScript and HTML5
The commercial version of IntelliJ should contain code-assist features for HTML5, CSS3, SASS, less, JavaScript, Coffeescript, node. js, ActionScript, and other languages. I will confirm the contents as soon as possible.
Unable to maximize the console compared to the shortcomings of Eclipse IntelliJ
In eclipse, you can use the Ctrl+m shortcut key or double-click the label to maximize the current console. But there is no such way in IntelliJ.
Mouse hover Display Javadoc
Of course, you can use the Ctrl+q shortcut key in IntelliJ to get the above functionality. But when the mouse hovers over the code you can see that part of the Javadoc function is so friendly in eclipse.
Summarize
In my opinion, every IDE is great,IntelliJ looks more modern , but sometimes I like the classic version of Eclipse, probably because I used to use eclipse a lot. May continue to be affected by this factor in the future.
Here is my whole experience, and I will continue to add some of the features and features that you encounter with Eclipse and IntelliJ, so please look forward to it.
English Original: http://www.javacodegeeks.com/2015/03/is-intellij-idea-shining-through-eclipse.html
Originating From: http://blog.jobbole.com/40852/
About shortcut keys
An IDE is not easy to use, the most important piece is the shortcut key design, before has been very depressed eclipse why even preference have not a shortcut key. Change to idea, a lot of instant, almost all of the common operations have shortcut keys, basically can do pure keyboard operation.
Familiar with a period of time IntelliJ shortcut keys, found in fact IntelliJ shortcut keys, design than eclipse better. and shortcut keys are related to the characteristics of the IDE, IntelliJ shortcut keys, is aimed at their own characteristics, specifically designed. I don't recommend using Keymap for Eclipse, take the time to familiarize yourself with IntelliJ's design.
and learning IntelliJ shortcut keys, there are very good ways:
- The Alt menu and the right mouse button, when executed, will naturally prompt shortcut keys.
- Help | Default Keymap Reference, this is a large commonly used shortcut key table, it is recommended to have time, take a moment to go over.
- Help | Find Action (Ctrl+shift+a), this shortcut key is very useful, is a command lookup, at any time, you can execute this command, enter the action you need, such as "Extract Method", the following will appear commands and corresponding shortcut keys
- This requires you to be familiar with the English name of the operation, in eclipse may be used to the muscle memory, not very remember the English name of the fast Jian. The big deal is to look for in eclipse, or turn to the idea of the Keymap table, there are categories.
After a period of idea, I found that even if eclipse is not stuck now, it will not go back, there is an old saying is called "from luxury into frugality."
Finally again spit groove a sentence, open source and do not make money of things, generally just do can use, there is no motivation to continue to do. If there is a commercial company to serve you, it will make you feel good, just can use hard to let users pay, to let users cool.
Originating From: http://blog.csdn.net/nacey5201/article/details/35570591
Recently want to use IntelliJ, so look for shortcut keys. Accustomed to eclipse, are not accustomed to IntelliJ shortcut keys. Slowly adapting to the usual shortcuts.
The difference between idea and Eclipse shortcut keys, the shortcut keys for Eclipse, and the shortcut for idea
Find class Name
CTRL + SHIFT + R
CTRL + N
Find a class in a jar package
CTRL + SHIFT + T
Two times CTRL + N
Find Files
CTRL + sheft + R
CTRL + sheft + N
Finding files in a jar package
CTRL + SHIFT + T
Two times CTRL + Sheft + N
Find methods and fields in a class
No
CTRL + sheft + ALT + N
Find those classes that call the resource (resources may be fields, methods, classes)
CTRL + SHIFT + G
ALT + F7, quick display Find content CTRL + ALT + F7
Finding variables in a file
Click Variable CTRL + K: Move
Click Variable CTRL + sheft + F7 highlight F3: move; Sheft + F3: Reverse movement
Number of anchor rows
CTRL + L
CTRL + G
Fast generation of Get set, constructors, etc.
ALT + SHIFT + S
ALT + INSERT
Quick Generate try Cache
SHIFT + ALT + Z
CTRL + ALT + T can also generate if else and so on other things
Quickly optimize reference packages
CTRL + SHIFT + O
CTRL + ALT + O
Quick Format Code
CTRL + SHIFT + F
CTRL + ALT + L
Refactoring code
CTRL + F2
SHIFT + F6
Display variables, methods in a class
CTRL + O
CTRL + F12
Quick Production class, method, field comment
CTRL + sheft + J
/** + ENTER
Line of code moves up or down
ALT + up and down keys
CTRL + SHIFT + up and down keys
Open the class or method at the cursor
F3
CTRL + B, CTRL + ALT + B Enter the implementation class for the interface or abstract class
Other shortcut keys:
F4 finding the source of a variable
CTRL + SPACE Code hint (conflicts with system IME, please add your own shortcut keys in Settings->keymap->mainmenu, code->completion->basic, right-click)
ALT + Enter import package, auto fix
CTRL + H To view the inheritance relationship for the class.
CTRL + Q To display the note document (as with the Eclipse Mouse on the class, method, field display content)
CTRL + W Check Code, continuous press will have other effects
CTRL + U View the parent class and interface of the current class,
CTRL + ALT + U view class UML diagram
CTRL + SHIFT + U Toggle Case
CTRL + P Method parameter hint, you can see what the polymorphic method of this method
SHIFT + ALT + INSERT Vertical edit mode
Other settings:
Smart Hints Ignore case
Editor-to-Code completion page has a case sensitive completion that can be set to be only first-letter sensitive, completely sensitive, or insensitive.
To set the JDK compilation version
Compiler the Java Compiler page has a version of the project bytecode version (leave blank for JDK default) yarn-dyed JDK, or there are various problems when compiling.
Set theme
Appearance page has a theme: option I prefer (darcula)
Set font
Editor--Colors & Fonts--and Font page scheme name: First Save As ... Just pick a name, and then you can show only monnospaced fonts select the font and change the font size.
Show line Numbers
Editor-to-appearence page on the Show line number tick.
Cancel Phonetic Check
Spelling page Configure ' spelling ' inspection click and then cancel the spelling option.
Cancel check without object (search never used keyword to remove the check of unused in it)
Cancel Auto Save file feature
The General page
Tick off Synchronize file on Frame activation option (synchronous file function, as appropriate, can not be canceled)
Tick off the Save files on framedeactivation option
Tick off the Save files automatically option and set the AutoSave interval to 30 seconds
The edited file displays the "*" tag
Editor–-> Editor Tabs The Mark modifyied Tabs with asterisk option on the page, the modified file will display the "*" tag as if it were elicpse.
Let IntelliJ idea start without opening the project file.
Settings--and the General page, tick off Reopen last project on startup option.
SVN Add Item error (Createproccess error=2 back with garbled)
Version Control--and the Subversion page, tick off the "Use Commmand line client:" option, then you will be prompted to choose SVN 1.6, svn 1.7, SVN 1.8, and so on. (as if only idea 13 had this problem)
IntelliJ idea and Eclipse shortcut key comparison "Go"