Intellij IDEA and eclipse mapping manual made by shuai.pan

Intellij IDEA and eclipse mapping manual made by shuai.pan

migrating from eclipse to Intellij IDEA

Overview

Switching from Eclipse to IntelliJ IDEA, especially if you've been using Eclipse for a long time, requires understanding some fundamental differences between the two IDEs, including their user interfaces, compilation methods, shortcuts, project configuration and other aspects.

No workspace

The first thing you'll notice when launching IntelliJ IDEA is that it has no workspace concept. This means that you can work with only one project at a time. While in Eclipse you normally have a set of projects that may depend on each other, in IntelliJ IDEA you have a single project that consists of a set of modules.
If you have several unrelated projects, you can open them in separate windows.
If you still want to have several unrelated projects opened in one window, as a workaround you can configure them all in IntelliJ IDEA as modules.

Intellij idea vs eclipse terminology

Eclipse IntelliJ IDEA
Workspace Project
Project Module
Facet Facet
Library Library
JRE SDK
Classpath variable Path variable

Templates

Template Eclipse IntelliJ IDEA
Define a main method main psvm
Iterate over an array for itar
Iterate over a collection for itco
Iterate over a list for itli
Iterate over an iterable using foreach syntax foreach iter
Print to System.out sysout sout
Print to System.err syserr serr
Define a static field static_final psf

Shortcuts between eclipse and Intellij IDEA

Eclipse Action Eclipse Shortcut IntelliJ IDEA Action IntelliJ IDEA Shortcut
Code completion Ctrl+Space Basic completion Ctrl+Space
- - Smart completion Ctrl+Shift+Space
- - Statement completion Ctrl+Shift+Enter
Quick access Ctrl+3 Search everywhere Shift x 2
Maximize active view or editor Ctrl+M Hide all tool windows Ctrl+Shift+F12
Open type Ctrl+Shift+T Navigate to class Ctrl+N
Open resource Ctrl+Shift+R Navigate to file Ctrl+Shift+N
- - Navigate to symbol Ctrl+Shift+Alt+N
Next view Ctrl+F7 - -
- - Recent files Ctrl+E
- - Switcher Ctrl+Tab or Ctrl+Shift+Tab
Quick outline Ctrl+O File structure Ctrl+F12
Move lines Alt+Up/Down Move lines Shift+Alt+Up/Shift+Alt+Down
Delete lines Ctrl+D Delete lines Ctrl+Y
Quick fix Ctrl+1 Show intention action Alt+Enter
Quick switch editor Ctrl+E Switcher Ctrl+Tab or Ctrl+Shift+Tab
- - Recent files Ctrl+E
Quick hierarchy Ctrl+T Navigate to type hierarchy Ctrl+H
- - Navigate to method hierarchy Ctrl+Shift+H
- - Show UML popup Ctrl+Alt+U
Last edit location Ctrl+Q Last edit location Ctrl+Shift+Backspace
Next editor Ctrl+F6 Select next tab Alt+Right
Run Ctrl+Shift+F11 Run Shift+F10
Debug Ctrl+F11 Debug Shift+F9
Correct indentation Ctrl+I Auto-indent lines Ctrl+Alt+I
Format Ctrl+Shift+F Reformat code Ctrl+Alt+L
Surround with Ctrl+Alt+Z Surround with Ctrl+Alt+T
- - Surround with live template Ctrl+Alt+J
Open declaration F3 Navigate to declaration Ctrl+B, Ctrl+Button1 Click or Button2 Click
- - Quick definition Ctrl+Shift+I
Open type hierarchy F4 Navigate to type hierarchy Ctrl+H
- - Show UML popup Ctrl+Alt+U
References in workspace Ctrl+Shift+G Find usages Alt+F7
- - Show usages Ctrl+Alt+F7
- - Find usages settings Ctrl+Shift+Alt+F7
Open search dialog Ctrl+H Find in path Ctrl+Shift+F
Occurrences in file Ctrl+Alt+U Highlight usages in file Ctrl+Shift+F7
Copy lines Ctrl+Alt+Down Duplicate lines Ctrl+D
Extract local variable Ctrl+Alt+L Extract variable Ctrl+Alt+V
Assign to field Ctrl+2/Ctrl+F Extract field Ctrl+Alt+F
Show refactor quick menu Ctrl+Alt+T Refactor this Ctrl+Shift+Alt+T
Rename Ctrl+Alt+R Rename Shift+F6
Go to line Ctrl+L Navigate to line Ctrl+G
Structured selection Shift+Alt+Up/Shift+Alt+Down Select word at caret Ctrl+W/Ctrl+Shift+W
Find next Ctrl+J Find next F3 or Ctrl+L
Show in Ctrl+Alt+W Select in Alt+F1
Back Ctrl+[ Back Ctrl+Alt+Left or Button4 Click
Forward Ctrl+] Forward Ctrl+Alt+Right or Button5 Click

你可能感兴趣的:(Intellij IDEA and eclipse mapping manual made by shuai.pan)