IntelliJ IDEA¶
Umfassende IntelliJ IDEA Shortcuts und Workflows für Java, Kotlin und mehrsprachige Entwicklung.
Allgemeine Shortcuts¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+Shift+A |
Cmd+Shift+A |
Find Action |
Double Shift |
Double Shift |
Search Everywhere |
Ctrl+N |
Cmd+O |
Go to Class |
Ctrl+Shift+N |
Cmd+Shift+O |
Go to File |
Ctrl+Alt+Shift+N |
Cmd+Option+O |
Go to Symbol |
Ctrl+E |
Cmd+E |
Recent Files |
Ctrl+Shift+E |
Cmd+Shift+E |
Recent Locations |
Alt+F1 |
Option+F1 |
Select In |
Ctrl+G |
Cmd+L |
Go to Line |
Ctrl+Tab |
Ctrl+Tab |
Switcher |
Navigation¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+B |
Cmd+B |
Go to Declaration |
Ctrl+Alt+B |
Cmd+Option+B |
Go to Implementation |
Ctrl+Shift+B |
Cmd+Shift+B |
Go to Type Declaration |
Ctrl+U |
Cmd+U |
Go to Super Method |
Alt+F7 |
Option+F7 |
Find Usages |
Ctrl+F7 |
Cmd+F7 |
Find Usages in File |
Ctrl+Shift+F7 |
Cmd+Shift+F7 |
Highlight Usages |
Ctrl+Alt+F7 |
Cmd+Option+F7 |
Show Usages |
Ctrl+H |
Cmd+H |
Type Hierarchy |
Ctrl+Shift+H |
Cmd+Shift+H |
Method Hierarchy |
Ctrl+Alt+H |
Ctrl+Option+H |
Call Hierarchy |
Bearbeitung¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+Space |
Ctrl+Space |
Basic Code Completion |
Ctrl+Shift+Space |
Ctrl+Shift+Space |
Smart Code Completion |
Ctrl+Alt+Space |
Ctrl+Option+Space |
Class Name Completion |
Ctrl+Shift+Enter |
Cmd+Shift+Enter |
Complete Current Statement |
Ctrl+P |
Cmd+P |
Parameter Info |
Ctrl+Q |
Ctrl+J |
Quick Documentation |
Shift+F1 |
Shift+F1 |
External Documentation |
Ctrl+F1 |
Cmd+F1 |
Show Error Description |
Alt+Insert |
Cmd+N |
Generate |
Ctrl+O |
Ctrl+O |
Override Methods |
Ctrl+I |
Ctrl+I |
Implement Methods |
Code Formatierung¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+Alt+L |
Cmd+Option+L |
Reformat Code |
Ctrl+Alt+O |
Ctrl+Option+O |
Optimize Imports |
Ctrl+Alt+I |
Ctrl+Option+I |
Auto-Indent Lines |
Tab |
Tab |
Indent Selection |
Shift+Tab |
Shift+Tab |
Unindent Selection |
Ctrl+X |
Cmd+X |
Cut Current Line |
Ctrl+C |
Cmd+C |
Copy Current Line |
Ctrl+D |
Cmd+D |
Duplicate Line |
Ctrl+Y |
Cmd+Backspace |
Delete Line |
Ctrl+Shift+J |
Ctrl+Shift+J |
Join Lines |
Herstellung¶
Windows/Linux | macOS | Description |
---|---|---|
F6 |
F6 |
Move |
Shift+F6 |
Shift+F6 |
Rename |
Ctrl+F6 |
Cmd+F6 |
Change Signature |
Ctrl+Alt+N |
Cmd+Option+N |
Inline |
Ctrl+Alt+M |
Cmd+Option+M |
Extract Method |
Ctrl+Alt+V |
Cmd+Option+V |
Extract Variable |
Ctrl+Alt+F |
Cmd+Option+F |
Extract Field |
Ctrl+Alt+C |
Cmd+Option+C |
Extract Constant |
Ctrl+Alt+P |
Cmd+Option+P |
Extract Parameter |
Ctrl+Shift+F6 |
Cmd+Shift+F6 |
Type Migration |
Suchen und Ersetzen¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+F |
Cmd+F |
Find |
F3 |
Cmd+G |
Find Next |
Shift+F3 |
Cmd+Shift+G |
Find Previous |
Ctrl+R |
Cmd+R |
Replace |
Ctrl+Shift+F |
Cmd+Shift+F |
Find in Path |
Ctrl+Shift+R |
Cmd+Shift+R |
Replace in Path |
Ctrl+F3 |
Cmd+F3 |
Find Word at Caret |
F4 |
F4 |
Find Next Occurrence |
Shift+F4 |
Shift+F4 |
Find Previous Occurrence |
Laufen und Debuggen¶
Windows/Linux | macOS | Description |
---|---|---|
Shift+F10 |
Ctrl+R |
Run |
Shift+F9 |
Ctrl+D |
Debug |
Ctrl+Shift+F10 |
Ctrl+Shift+R |
Run Context Configuration |
Ctrl+Shift+F9 |
Ctrl+Shift+D |
Debug Context Configuration |
F8 |
F8 |
Step Over |
F7 |
F7 |
Step Into |
Shift+F7 |
Shift+F7 |
Smart Step Into |
Shift+F8 |
Shift+F8 |
Step Out |
Alt+F9 |
Option+F9 |
Run to Cursor |
Alt+F8 |
Option+F8 |
Evaluate Expression |
F9 |
Cmd+Option+R |
Resume Program |
Ctrl+F8 |
Cmd+F8 |
Toggle Breakpoint |
Versionskontrolle¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+K |
Cmd+K |
Commit |
Ctrl+Shift+K |
Cmd+Shift+K |
Push |
Ctrl+T |
Cmd+T |
Update Project |
Alt+Shift+C |
Option+Shift+C |
View Recent Changes |
Alt+9 |
Cmd+9 |
Version Control Tool Window |
Ctrl+Alt+Z |
Cmd+Option+Z |
Rollback |
Ctrl+Alt+A |
Cmd+Option+A |
Add to VCS |
Live-Vorlagen¶
Häufige Java-Vorlagen¶
Template | Expansion |
---|---|
psvm |
public static void main(String[] args) |
sout |
System.out.println() |
souf |
System.out.printf() |
soutm |
System.out.println("methodName") |
soutp |
System.out.println("parameterName = " + parameterName) |
soutv |
System.out.println("variableName = " + variableName) |
fori |
for (int i = 0; i < ; i++) |
iter |
for (Type item : collection) |
itar |
for (int i = 0; i < array.length; i++) |
ritar |
for (int i = array.length - 1; i >= 0; i--) |
Gemeinsame Kotlin Vorlagen¶
Template | Expansion |
---|---|
fun |
fun functionName() \\{\\} |
main |
fun main(args: Array<String>) \\{\\} |
println |
println() |
fori |
for (i in 0 until ) |
fore |
for (item in collection) |
ifn |
if (value != null) |
inn |
if (value == null) |
Produktivitätsmerkmale¶
Code Generation¶
```java // Generate constructor Alt+Insert → Constructor
// Generate getters/setters Alt+Insert → Getter and Setter
// Generate toString() Alt+Insert → toString()
// Generate equals() and hashCode() Alt+Insert → equals() and hashCode()
// Generate test methods Alt+Insert → Test ```_
Postfix Fertigstellung¶
java
// Examples of postfix completion
list.for → for (String item : list)
condition.if → if (condition)
obj.null → if (obj == null)
obj.nn → if (obj != null)
obj.var → Type obj =
obj.return → return obj;
_
Absichten und Schnellkorrekturen¶
java
// Common intentions (Alt+Enter)
- Convert to lambda
- Add type annotation
- Create method from usage
- Implement interface
- Add import statement
- Surround with try-catch
_
Projektleitung¶
Datei- und Projektoperationen¶
Windows/Linux | macOS | Description |
---|---|---|
Ctrl+Alt+Shift+S |
Cmd+; |
Project Structure |
Ctrl+Alt+S |
Cmd+, |
Settings |
Ctrl+Shift+A |
Cmd+Shift+A |
Find Action |
Ctrl+Shift+F12 |
Cmd+Shift+F12 |
Toggle Maximized Editor |
Alt+1 |
Cmd+1 |
Project Tool Window |
Alt+7 |
Cmd+7 |
Structure Tool Window |
Alt+9 |
Cmd+9 |
Version Control Tool Window |
Alt+F12 |
Option+F12 |
Terminal |
Bauen und laufen¶
```bash
Maven projects¶
mvn clean compile mvn test mvn package mvn install
Gradle projects¶
./gradlew build ./gradlew test ./gradlew run ./gradlew clean
SBT projects (Scala)¶
sbt compile sbt test sbt run ```_
Best Practices¶
Code Qualität¶
- Verwenden Sie Codeinspektionen und Analysetools
- Befolgen Sie Kodierungsstandards und Konventionen
- Vollständige Gerätetests schreiben
- Verwenden Sie sinnvolle Variablen und Methodennamen
- Methoden klein und fokussiert halten
Leistungsoptimierung¶
- geeignete Datenstrukturen verwenden
- Vermeiden Sie vorzeitige Optimierung
- Profilcode, um Engpässe zu identifizieren
- Lazy Initialisierung verwenden, wenn nötig
- Objekt-Erstellung in Schleifen minimieren
Debugging Strategien¶
- Verwenden von bedingten Breakpoints
- Ausdrücke beim Debugging auswerten
- Verwenden Sie Protokollierung für Produktions Debugging
- Schritt für Code systematisch
- Überprüfen Sie variable Zustände und Anrufstapel
Plugin Empfehlungen¶
- SonarLint: Analyse der Codequalität
- CheckStyle: Code-Style-Überprüfung
- **FindBugs*: Fehlermustererkennung
- Lombok*: Kesselplattencode reduzieren
- **Datenbank-Tools*: Datenbankintegration
- Docker: Container-Unterstützung
- Kubernetes: Orchesterunterstützung