0% found this document useful (0 votes)
56 views102 pages

gettingtoknowIntelliJIDEA Community

The document is a preface for the book 'Getting to Know IntelliJ IDEA (Community Edition)', which is freely available via Leanpub. It outlines the structure of the book, including sections on the authors, new features in the second edition, and guidance on how to use the book effectively. The content covers various aspects of IntelliJ IDEA, including installation, user interface changes, and fundamental principles.

Uploaded by

SaidaRao Potla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views102 pages

gettingtoknowIntelliJIDEA Community

The document is a preface for the book 'Getting to Know IntelliJ IDEA (Community Edition)', which is freely available via Leanpub. It outlines the structure of the book, including sections on the authors, new features in the second edition, and guidance on how to use the book effectively. The content covers various aspects of IntelliJ IDEA, including installation, user interface changes, and fundamental principles.

Uploaded by

SaidaRao Potla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

Preface

Getting to Know IntelliJ IDEA (Community


Edition)
All rights reserved. No portion of this book may be reproduced, copied, distributed or adapted in any way,
with the exception of certain activities permitted by applicable copyright laws, such as brief quotations in
the context of a review or academic work. For permission to publish, distribute or otherwise reproduce
this work, please contact the authors [mailto:[email protected]].

This community version is freely available via Leanpub.

1
Getting to Know IntelliJ IDEA (Community Edition)

Table of Contents
Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About the authors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Trisha Gee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Helen Scott. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
What’s new in the second edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
New UI changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
AI Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Other changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The fundamentals remain the same . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Getting the most from this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Who should read this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Signposts to look out for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
IntelliJ IDEA versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
A note about shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Technical reviewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Translation help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Cover design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
I: Getting to Know IntelliJ IDEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1. What is IntelliJ IDEA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1. What is IntelliJ IDEA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2. Who makes it?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3. Community Edition versus Ultimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2. The IntelliJ IDEA guiding principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1. Always Green . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2. Keyboard First. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3. In the Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3. Installing IntelliJ IDEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4. IntelliJ IDEA out of the box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1. Welcome screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2. New UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3. Tip of the day. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4. Balloon notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.5. Tool window buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.6. Tool windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.7. Main Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.8. Editor tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.9. Status bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.10. Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2
Table of Contents

4.11. After upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


5. Where to look . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.1. In the editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2. Gutter icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3. Right scrollbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.4. Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.5. Notifications window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.6. Tool windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.7. Dialogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.8. Seeing or changing your settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.9. Finding your JDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6. How IntelliJ IDEA sees your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1. IntelliJ IDEA’s view of your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.2. IntelliJ IDEA’s internal map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.3. Finding your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.4. Projects and workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.5. Establishing Version Control status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.6. IntelliJ IDEA Ultimate Framework support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7. Plugins and your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7. Tuning your IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.1. Startup Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.2. Main Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.3. Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.4. Editor Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.5. Tool windows and their buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.6. Inlay Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8. Where to get help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.1. IntelliJ IDEA’s YouTube channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.2. IntelliJ IDEA’s online help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.3. IntelliJ IDEA’s Feature Trainer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.4. JetBrains Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.5. IntelliJ IDEA’s Blog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.6. IntelliJ IDEA Community Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.7. IntelliJ IDEA YouTrack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.8. Stack Overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
II: Working with code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9. Writing code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
10. Creating code quickly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
10.1. Suggestions while you type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
10.2. Type-sensitive suggestions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
10.3. Just keep typing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
10.4. Complete your code’s structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
10.5. Generate common code structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

3
Getting to Know IntelliJ IDEA (Community Edition)

10.6. Create a new…. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


10.7. Generate from missing code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
11. Fixing and changing your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.1. See suggestions in the editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.2. Fix errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.3. Improve code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.4. Change code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.5. Check spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12. Activating your muscle memory with Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.1. Focus on the editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.2. "Get me out of here" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.3. Extra-fast copy/cut line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.4. Duplicate line or selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.5. Delete line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.6. Format code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
13. Moving through your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.1. Finding anything . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.2. Viewing and opening recent files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.3. Viewing and moving to recent locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.4. Going to a specific line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.5. Moving backward and forward through code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.6. Moving between your code and its test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.7. Finding where this code is used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.8. Seeing details of the code you are calling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
14. Understanding code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.1. Hints in the editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.2. API and documentation at a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.3. Readable code documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.4. Hide distracting code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.5. Syntax highlighting for embedded code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.6. Code use and data values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.7. Understanding the flow of your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.8. Understanding changes over time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
14.9. Getting insight into the code’s intended behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
III: Developing applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
15. Opening a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
15.1. How IntelliJ IDEA uses your project’s build tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
15.2. Cloning a project from GitHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
16. Running your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
16.1. Re-running an application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
16.2. Terminating a process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
17. Debugging your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
18. Testing your code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4
Table of Contents

19. Combining testing and debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73


20. Managing dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
20.1. Why do you need dependency management? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
20.2. Seeing your project’s dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
20.3. Adding dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
21. Working with a build tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
21.1. A view of your project’s build tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
21.2. Running the build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
21.3. Finding your build configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
22. Keeping track of code changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.1. Enabling Version Control (Git) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.2. Committing changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.3. The Git tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.4. Seeing code changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.5. What to look for when you’re ready to commit your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.6. Working with remote version control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
22.7. Your last line of defence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
IV: IntelliJ IDEA Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
23. Fixing errors and warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
23.1. FAQ: Recognising and managing warnings and errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
24. Refactoring your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
24.1. FAQ: Changing your code without breaking it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
25. Formatting and arranging your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
25.1. FAQ: When and how to format and arrange your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
26. Benefiting from multiple clipboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
26.1. FAQ: Copying and pasting in IntelliJ IDEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
27. Using Run Configurations effectively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
27.1. What is a Run Configuration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
27.2. Editing configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
27.3. FAQ: Running applications and tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
27.4. Run Anything . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
28. Diving into debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
28.1. FAQ: The importance of breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
28.2. FAQ: Seeing program state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
28.3. Debugging a remote application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
28.4. Debugging performance problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
29. Expanding on testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
29.1. FAQ: Test coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
29.2. FAQ: Getting comfortable with automated tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
30. Building on build tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
30.1. The Maven or Gradle tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
30.2. FAQ: Maven, Gradle and IntelliJ IDEA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
31. Doing more with dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

5
Getting to Know IntelliJ IDEA (Community Edition)

31.1. Dependencies tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87


31.2. FAQ: Working with dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
32. Making version control work for you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
32.1. Why work with a Version Control System (VCS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
32.2. The Commit tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
32.3. FAQ: Committing changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
32.4. The Git tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
32.5. FAQ: Working with branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
32.6. FAQ: Git for more experienced users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
33. Viewing and applying local history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
33.1. FAQ: Using Local History to get back to a known working state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
34. Running commands in the terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
34.1. FAQ: Working with the built-in terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
35. Managing work TODO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
35.1. FAQ: Viewing and managing your project’s TODOs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
36. Pairing with code with me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
36.1. Using Code With Me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
36.2. FAQ: Tips for Code With Me. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
37. Working with plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
37.1. FAQ: How to view and change the plugins you work with . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
38. Using AI Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
39. Understanding Java in IntelliJ IDEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
39.1. FAQ: IntelliJ IDEA’s Java settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
39.2. FAQ: Troubleshooting JVM errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
40. Deciphering the Project Structure dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
40.1. FAQ: JVM and Java Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
40.2. FAQ: Project Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
41. Looking in your .idea folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
41.1. FAQ: Understanding what’s in your .idea folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
42. Changing IntelliJ IDEA settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
42.1. FAQ: Tinkering with your project settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
43. What to do if things go wrong . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.1. Where to look in the IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.2. Writing and running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.3. Problems with your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.4. Problems with the IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.5. Problems caused by plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
43.6. What to check and change. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Appendix A: Top Tips that did not make it into the book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
A.1. Multiple carets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
A.2. Multi-line Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
A.3. Find in Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
A.4. Shortcut on dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

6
Table of Contents

A.5. Searchable dialogs and tool windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101


Appendix B: Top Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

7
Getting to Know IntelliJ IDEA (Community Edition)

Dedication
To friendship. It ebbs and flows. If you ride the waves you can achieve so much together.

8
About the authors

About the authors


Trisha and Helen have taken different career paths but share fundamental values when it comes to
learning and the community we serve.

Trisha Gee

Trisha is a Java Champion, author of Head First Java, and was an IntelliJ IDEA Advocate at JetBrains for
seven years.

Before working for JetBrains, Trisha built up experience using IntelliJ IDEA while pairing with other, much
more experienced, developers. She was blown away by how much you can achieve if you really
understand the tool, and horrified that she’d been using IDEs to develop Java applications for ten years and
barely scraped the surface of what they could do. This inspired her to move into developer advocacy and
give live coding demos of how to be effective with Java, while at the same time showcasing what you can
do with an IDE.

Trisha’s passion is developer productivity, and learning how to make the most of the tools available to you
is key to being productive.

You can find out more about Trisha on her website [https://trishagee.com/].

9
Getting to Know IntelliJ IDEA (Community Edition)

Helen Scott

Helen is a Java Developer Advocate at JetBrains where she enjoys the variety of tasks that the role affords
her. She started her career a long time ago (in a galaxy far far away) as a Java developer using tools such as
Vim; IDEs were only just being released back then! After a couple of years, Helen chose to pursue a career
in Technical Writing to join her passions for working with developers and content creation.

Helen returned to the world of Java in 2020 when she joined JetBrains as a Java Developer Advocate where
she was inspired by what IntelliJ IDEA can do to support developers. She has since rekindled her fondness
for Java and delivers blogs, tutorials, videos, talks and apparently a book(!) on everything to do with IntelliJ
IDEA and its community.

It’s safe to say that Helen is a huge fan of the product and wishes it had existed when she first started
working with language!

You can find out more about Helen on her website [https://helenjoscott.com/].

10
What’s new in the second edition

What’s new in the second edition


The second edition of the book has been updated to cover the user interface update from JetBrains, or New
UI as it’s commonly referred to. The New UI contains several updates which we’ve summarised here, and
we’ve updated all the screenshots and workflows to the most modern way of working with IntelliJ IDEA.

Before we summarise the changes to IntelliJ IDEA, and other IntelliJ-based IDEs, it’s worth saying that
change is hard. However, the New UI is a much cleaner interface that reduces clutter and addresses some
of the legacy issues that the IDE was facing by virtue of it being a 20-year-old product that has evolved over
the years.

In IntelliJ IDEA 2023.3, the version we’re using in this book, the New UI is the default for
all new users of the IDE, which includes existing users if they delete all their settings and
 install the IDE from scratch. Existing users who migrate their settings from version to
version will have the classic UI by default and will need to enable the New UI in order to
use it.

We recommend that you turn the New UI on in your Settings (⌘, | Ctrl+Alt+S), if it’s not already enabled,
and spend a bit of time finding your way around; it won’t take you long to get used to it!

Trisha Tip
I’m the sort of person who hates it when the UI of something I use all the time
changes. I hate that nothing is where I expect it to be, and I don’t like that it doesn’t
look the way I expect. However, it took me almost no time to adapt to the New UI of
 IntelliJ IDEA. Unusually for me, I preferred it almost immediately. When I had to
switch back to the old one (mostly to take screenshots for the previous edition of this
book!) I was grumpy at having to use the "dated" old UI.

New UI changes
Overview
The new themes not only look great, but they bring with them consistency and contrast where needed. The
icons are cleaner and nicer to look at and the font has been modernised too.

Tool windows
The Tool windows have been overhauled both in terms of icons, placement and keyboard shortcuts to
them. In addition, the buttons are bigger and the shortcuts to them are no longer on the buttons. This
means if you want to know the keyboard shortcut you need to hover over the Tool window in question. We
know that some of you might miss this feature, however with the prettier icons, the interface does look
cleaner without the numbers. In addition, Tool windows can be split vertically or horizontally to suit your
needs.

The Quick Launch button has been removed in favour of a new More tool windows link which you can
access by clicking on the ellipsis button below default tool windows on the left of the IDE in the default
layout. We’ll show this in Ch. 4, IntelliJ IDEA out of the box.

Main toolbar
11
Getting to Know IntelliJ IDEA (Community Edition)

The New UI has completely revamped the top part of the IDE. Instead of a Navigation bar and several
clusters of icons, there’s a new Main toolbar. This contains widgets which have been introduced to group
functionality in the IDE, so you know where to look. The Main toolbar is your one-stop-shop for managing
your projects, the VCS actions you use the most and of course, running and debugging.

Navigation bar
The Navigation bar has moved from the top to the bottom and now sits in the Status bar at the bottom of
the editor window.

Editor
The editor has two main changes. Firstly, you might notice that tabs use more space and have a bigger font
for legibility. Editor tabs also now benefit from coloured highlighting that mirrors their appearance in the
Project tool window.

Run and Debug tool windows


The Debug tool window is now much simpler. There’s now only one set of actions for debugging, and these
are the ones we generally use all the time anyway. However, if you’re missing something, you can add it
back by right-clicking to the left of the ellipsis in your Debug tool window and choosing the action you
need.

AI Assistant
In 2023 everyone was talking about how AI can help developers be more productive. We have added a
chapter to this second edition on JetBrains' AI Assistant in IntelliJ IDEA, with some tips on how to use it.

Other changes
Each version of IntelliJ IDEA brings new features, improvements, and sometimes changes to existing
behaviour. The second edition of Getting to Know IntelliJ IDEA has been updated to reflect the behaviour
of IntelliJ IDEA 2023.3. Most of the behaviour, settings and general workflow remains as it was in IntelliJ
IDEA 2022.2, the version we used for the first edition. The areas that saw the most change were:

• Dependencies. Package search, which adds the Dependencies window to IntelliJ IDEA, is now a
separate plugin and not a default part of the IDE. Both chapters covering dependencies have been
updated to reflect this.

• Code Coverage. Setting up IntelliJ IDEA to find how much of your code is tested has changed a bit, so
we’ve updated the advice on how to do this.

• Version Control. The UI has changed for version control, mostly because what was available in the
Status Bar is now in the Main toolbar. There were a few behaviour changes too, specifically around
how IntelliJ IDEA runs analysis and checks on your code when you commit it. All the VCS sections of the
book now reflect the new way IntelliJ IDEA works.

• Code With Me. The UI and functionality of Code With Me has matured over the last year or more, so
we’ve updated the Code With Me chapter to include the improvements.

• Java. We’ve updated all the code to use Java 21, the latest Long Term Support release of Java.

• Build Tools. Many of the Gradle projects have been migrated to the Kotlin DSL, since that’s the default
for a number of frameworks these days.

12
What’s new in the second edition

The fundamentals remain the same


Despite some small behaviour changes and some very noticeable UI changes in IntelliJ IDEA, the tutorials
in the book have not changed much at all, apart from having prettier screenshots. The fundamental
workflows remain the same as they always have been.

13
Getting to Know IntelliJ IDEA (Community Edition)

Getting the most from this book


This book contains decades of experience with IntelliJ IDEA all squished into the smallest number of pages
possible. We respect your time, which is why we’ve been very precise on what to share and, almost more
importantly, what not to share.

Our plan is to get you up and running in IntelliJ IDEA and being productive as soon as possible by learning
from our experiences. Throughout the book we will share a bunch of cool tips and tricks that will help you
to level up your use of IntelliJ IDEA.

Parts II and III contain tutorials. We have limited these to use cases that point you to the key features that
are useful in a wide range of scenarios. Part IV covers specific areas of IntelliJ IDEA, and uses a questions-
and-answer approach to cover the key use cases where you would need these features.

If you are new to IntelliJ IDEA, we recommend you start at the beginning and work through the book in
order. We’ve laid the contents out in the order you’re likely to need it when you’re setting up IntelliJ IDEA
and then creating your first project.

If you’ve used IntelliJ IDEA before, we encourage you to dip into the chapters you need when you need
them. While many of the chapters do build on concepts introduced earlier in the book, each chapter covers
an individual area which should stand alone. Our goal is for you to be able to read a single chapter that
covers something you want to understand better.

That said, those are just our suggestions. We don’t mind where or how you read this book really. We just
hope that you get value from it and learn something that’s useful to you.

Who should read this book


This book is for developers using IntelliJ IDEA, whether you’re just beginning or have been using it for a
while. If you’re just beginning with IntelliJ IDEA, we’ll take you on the journey of learning the tool quickly
and efficiently to help you be as productive as possible. If you’ve been using IntelliJ IDEA a while, then
we’ll help you expand your horizons and show you some cool tricks which will improve your productivity.

At the top level, this book is primarily aimed at Java developers who use, or want to use, IntelliJ IDEA, but
anyone who uses an IntelliJ Platform IDE (for example, Webstorm, PyCharm, Rider) should pick up plenty
of tips.

Signposts to look out for


We want you to be able to see at a glance the information that’s most relevant to you. We’ve created
several "elements" that appear throughout the book, that should help you:

• Learn quickly what certain features are useful for

• See at a glance the key points of a particular chapter

• Skim to the most relevant sections for you

Your authors come from different backgrounds. Trisha has been using IntelliJ IDEA for over 15 years, and
has used it to develop Java applications large and small for all sorts of organisations. Helen came to IntelliJ
IDEA much more recently, and therefore has a lot of up-to-date knowledge on how to get started effectively.
We want you to benefit from these two viewpoints, so we’ve scattered Helen Hints and Trisha Tips
throughout the book.

14
Getting the most from this book

Trisha Tip
Trisha’s tips are usually her opinions on the "best" way to do things, based on her
 experience. All readers should get some insight into the choices that face them for a
particular topic, but more experienced users may find these most helpful.

Helen Hint
Helen’s hints are usually about getting up to speed quickly, and helping you with
 any potentially confusing areas. These are valuable for all readers, although new
users will particularly get value from them.

There are also more general pointers for all readers:

Important Point. This is something all readers should read and remember.
Understanding what’s written in an "Important" block will help you grasp a particular
 concept and prevent you from making common mistakes. There are not many of these so
look out for them!

Note. This contains a key concept, where understanding this will help point you in the
 right direction.

In Ch. 2, The IntelliJ IDEA guiding principles we’ll cover the principles that will help you understand how to
get the most out of IntelliJ IDEA. These three principles will appear throughout the book:

In The Flow: When you see this icon, you’ll know that this section covers features that help to keep
you "in the zone", that state of flow which is really productive while coding.

Always Green: When you see this icon, you’ll know that this section covers features that keep your
code compiling. IntelliJ IDEA can offer you the most help when your code has no compiler errors, and you
can use it to keep your code compiling even while making big changes.

Keyboard First: When you see this icon, you’ll be learning keyboard shortcuts. Using the keyboard is
much faster than using the mouse, and it can help you stay "in the flow" when muscle-memory takes over
and you don’t have to think about where you need to move the mouse to in the user interface.

We have assumed that you’ll have IntelliJ IDEA open, so you can try out the features, tips and tricks that
we’re covering. We’ll be highlighting specific things to try out with:

Try It!
When you see this icon, we’re asking you to do something in the IDE. When you Try It!, you’ll see
how it works, you’ll learn your way around the IDE, and your fingers will start to learn the shortcuts.

If there’s more detail about the topics covered in a chapter, we’ve added a "More Information" section at
the end of the chapter. This contains links to videos, blog posts, tutorials, help documentation, and so on.

15
Getting to Know IntelliJ IDEA (Community Edition)

IntelliJ IDEA versions


The instructions and screenshots for this second edition book are based on IntelliJ IDEA 2023.3. Behaviour
does vary between versions, so some screenshots may not show exactly what you’re seeing in your IDE.

Where a feature is relatively new, we mention the version the feature was introduced in. If you can’t find
that feature in your IDE, you’ll need to check which version you’re using.

We have used IntelliJ IDEA Community by default. You can assume the features we cover in the book are
available in both Community (the free version) and IntelliJ IDEA Ultimate (the one you have to pay for).

If we mention a feature that’s only in IntelliJ IDEA Ultimate, we will explicitly say that, and you will
see this IntelliJ IDEA Ultimate logo.

A note about shortcuts


One of the key concepts for being really effective with IntelliJ IDEA is Keyboard First, we think you
should try to learn the keyboard shortcuts for the operations you do most often.

Throughout the book, we will show the keyboard shortcuts for Mac, Windows and Linux. We’ll be using
the default keymap for each of these operating systems. You can download a handy printable reference too
- there’s a link at the bottom of this chapter. In the interests of saving space these will be rendered as
([macOS shortcut] | [Windows/Linux shortcut]). For example, (⌥⏎ | Alt+Enter).

We’ll be using the standard symbols for Mac keyboard shortcuts, rather than spelling out the whole name,
and for Windows and Linux we’ll spell it out.

Here’s a quick reference for Mac users if you’re unfamiliar with the icons, or your keyboard doesn’t have
the same symbols on the keys:

• ⇧ Shift

• ⌘ Command

• ⌃ Control

• ⌥ Option, or Alt on some keyboards

• ␣ Space

• ⎋ Escape

Feedback
We want to hear from you! You can email us [mailto:[email protected]] with any feedback.

More information
• Default keymap [https://tinyurl.com/yc3u4tdb] (IntelliJ IDEA online help)

• Handy printable reference for IntelliJ IDEA keyboard shortcuts from JetBrains [https://tinyurl.com/
33myzcsv]

16
Acknowledgements

Acknowledgements
This book would not have been possible without the help and support of some very awesome people.
Thank you to Hadi Hariri, Mala Gupta and Marit van Dijk for encouraging us on this personal venture.
Thank you to Josh Long, for showing us it is possible to self-publish a technical book like this one.

Trisha: Thanks to Israel Boza Rodriguez. When you got fed up with Trisha writing Yet Another Book, you
gave advice and time to get it finished! Thanks to Evie and Amy for your constant interest in the progress
of the book, it was extremely encouraging. Thank you to Mike Gee for the use of your house for a four-day
"let’s get this book done" sprint, and for driving me to see Helen on more than one occasion.

Helen: Thanks to Mark Scott for being exceptionally tolerant and understanding of the statement "I’m just
working on the book… I’ll be there in a minute!". Your patience and support enabled me to graduate from
wannabe author to actual author, I appreciate you. I would also like to offer thanks to my almost-two-year-
old dog, but realistically, you are still far more of a hindrance than a help.

Technical reviewers
We have had the benefit of experienced sets of eyes on this book for which we are eternally grateful. Any
errors or omissions are ours and ours alone.

Maarten Balliauw thank you for your suggestions, some text in this book is a literal copy of your feedback.

Yann Cebron your feedback was both thorough and thoughtful; you also enlightened us along the way.

Dalia Abo Sheasha you put your user hat on throughout, and we thank you for it. Your feedback on the
tutorials was very valuable and helped us to take a step back and evaluate our goals.

Translation help
We have a Spanish version of the book (please recommend to your Spanish-speaking developer friends!),
which would not have been possible without the help of developers who speak Spanish natively. Trisha
would like to acknowledge Israel Boza Rodriguez, María Arias de Reyna Domínguez, Jorge Jiménez
Barra and Isabel Garrido.

Cover design
Cover design by the talented Iñaki Salas [https://brandswok.com/]. Thank you! You made our book look like a
real book!

17
Getting to Know IntelliJ IDEA (Community Edition)

Part I: Getting to Know IntelliJ IDEA


In Part I, we’re going to set the scene for working with IntelliJ IDEA. We will:

• Learn about what IntelliJ IDEA is, who makes it and what the different editions are.

• Discuss the three guiding principles of IntelliJ IDEA that we use throughout this book.

• Show you where to find information on installing the IDE.

• Give you pointers on how you can get the most from the IDE.

• Show you the key areas of the user interface.

• Talk about how IntelliJ IDEA works with your projects.

To get started on writing code straight away, you can go to Part II, but to get the most out of IntelliJ IDEA,
we recommend sticking around for the rest of Part I to get to know how IntelliJ IDEA "thinks".

You are reading the community version of this book, thank you for that! This free community version
contains all of Part I of Getting to Know IntelliJ IDEA, but does not include Parts II, III and IV.

18
1. What is IntelliJ IDEA?

1. What is IntelliJ IDEA?

Chapter Summary
• What is IntelliJ IDEA?

• Who makes IntelliJ IDEA?

• What are the different editions?

1.1. What is IntelliJ IDEA?


IntelliJ IDEA is a cross-platform IDE for developing in Java and other JVM languages. It is an IDE built on
the IntelliJ platform along with other IDEs from JetBrains, such as PyCharm, Rider and WebStorm.

Android Studio, maintained by Google, is based on IntelliJ IDEA, and the Android features are frequently
merged back into IntelliJ IDEA too.

1.2. Who makes it?


JetBrains are the company behind IntelliJ IDEA, they created IntelliJ IDEA in 2001. JetBrains are an
international company with offices and people all over the world. They are headquartered in Prague in the
Czech Republic.

1.3. Community Edition versus Ultimate


There are two editions of IntelliJ IDEA; Community and Ultimate. IntelliJ IDEA Community Edition is free,
completely, even for commercial development. IntelliJ IDEA Community Edition is open-source and
licensed under Apache 2.0.

The second edition is IntelliJ IDEA Ultimate. You need to have a subscription to use the Ultimate version.
There are two different types of subscriptions, one for personal use and one for organisation. If you’re
tempted to pay for it yourself, make sure you’re buying the individual subscription, it’s much cheaper!

Both versions fully support Java, Android and JVM-language (Kotlin, Scala, Groovy) development. The main
differences between Community and Ultimate are:

• IntelliJ IDEA Ultimate has support for Java enterprise frameworks including Spring, Jakarta EE,
Quarkus, Micronaut, Helidon, and more.

• In addition, IntelliJ IDEA Ultimate is more of a polyglot IDE, and provides support for other languages
like SQL, Go, PHP, Ruby, JavaScript and TypeScript. It also supports more frameworks, like Angular,
Node.js, Vue.js, React, Drupal, Django and so on.

More information
• JetBrains office locations [https://tinyurl.com/ypx5e68x]

• IntelliJ IDEA Ultimate vs IntelliJ IDEA Community features from JetBrains [https://tinyurl.com/2ccb87r3]

• IntelliJ IDEA Community [https://tinyurl.com/3mae46zs] (GitHub repository)

19
Getting to Know IntelliJ IDEA (Community Edition)

• Android Studio [https://tinyurl.com/5nzz6p49]

20
2. The IntelliJ IDEA guiding principles

2. The IntelliJ IDEA guiding principles

Chapter Summary
• How does IntelliJ IDEA help me to be a more effective developer?

• What three principles should I bear in mind to figure out why IntelliJ IDEA might work in a
particular way?

• How might IntelliJ IDEA encourage me to work differently when compared to working with
another editor?

IntelliJ IDEA helps you to keep your code always green by fixing the problem when and where it
happened. IntelliJ IDEA’s shortcuts enable you to work keyboard first, increasing the speed with which
you can, for example, navigate to and fix errors. All of this leads to you staying in the flow while you’re
developing, keeping you in the context of the problem you’re currently solving and reducing your
cognitive load.

Throughout the book, you’ll see the same three principles crop up again and again:

• Always Green

• Keyboard First

• In the Flow

Together these form what we’re calling the IntelliJ IDEA Guiding Principles.

The IDE will always evolve and change, the user interface will be updated, and features will inevitably be
added or moved. However, these are some fundamentals that we think you should bear in mind to help
you get the most out of working with IntelliJ IDEA, no matter what language or toolset you’re working
with.

2.1. Always Green

IntelliJ IDEA is designed to keep your code compiling all the time. Yes, you can make a change which
breaks compilation and go around fixing all the pieces of code that don’t compile, but usually you won’t
need to do that in IntelliJ IDEA.

What if you’ve called a method that doesn’t exist? No problem, IntelliJ IDEA suggests creating a stub
method that will have the minimum code to keep your project compiling. How about if you want to change
the name of something? You can use IntelliJ IDEA’s Rename functionality, and IntelliJ IDEA will
automatically update the name everywhere.

Trisha Tip
If my code is green as I’m working on it, I can focus on the one thing I’m trying to do
right now. It reduces my cognitive load. Instead of working through a list of errors to
 fix and not remembering what caused each error, I rely on IntelliJ IDEA to make the
smallest change needed to keep everything compiling.

21
Getting to Know IntelliJ IDEA (Community Edition)

Much of the functionality in IntelliJ IDEA that we will talk about, such as Live Templates and Code
Generation, work to keep your code always green and compiling by removing an element of human error
such as typos.

Keep an eye out for this icon. When you see it, you’ll know we’re talking about functionality that aims
to keep your code compiling.

2.2. Keyboard First


The fastest way to perform actions in IntelliJ IDEA is to use the keyboard. It’s tempting to use the
mouse to open menus, to click on things in windows and dialogs. However, it’s much faster to use the
keyboard shortcut or to tab over to the right place and press (⏎ | Enter).

IntelliJ IDEA is full of keyboard shortcuts, so our suggestion is to learn just a few to begin with. As you load
these into your muscle memory, you can work at gradually adding more shortcuts to your internal library
until you don’t need to use the mouse for 90% of your day-to-day work.

We will be prioritising keyboard shortcuts and giving you gentle reminders to learn them as you go
through this book.

Helen Hint
You can download and print the keyboard shortcuts - check out the link at the
 bottom of this chapter. This is especially useful when you’re training your fingers to
press the right keys!

When you first use IntelliJ IDEA, you’ll be drawn to the mouse and menu items, or buttons, to look for
useful actions. However, you can use Search Everywhere to find any setting, file or action. This should be
your default for "I wonder if I can do…", which is particularly useful if you have a reasonable idea of what
you want to do.

This is your first keyboard shortcut to learn. The shortcut for Search Everywhere is (⇧⇧ | Shift+Shift).

Try It!
Press (⇧⇧ | Shift+Shift) (that’s Shift twice) and see what you can search for! Fun fact: this works in all
the IntelliJ Platform IDEs (such as WebStorm and PyCharm), so no matter what language you’re
using, this will work.

Helen Hint
It can be hard to go straight to keyboard shortcuts. Every fibre of your body might
 want to use the mouse/trackpad, but do persevere! The speed gains you will get
from using the keyboard shortcuts out of the box are worth it, I assure you!

2.3. In the Flow


IntelliJ IDEA helps to keep you in the flow. If you type something, and it’s immediately highlighted in

22
2. The IntelliJ IDEA guiding principles

red, you can get IntelliJ IDEA to suggest a fix while you still remember what you were trying to achieve.
This means that you won’t need to context switch back to that point later and try to figure out what you
were doing.

IntelliJ IDEA helps you fix problems or sculpt code into a different shape with context-sensitive
suggestions. Your code shouldn’t be red for more than a few seconds. By providing an immediate feedback
loop, your flow is uninterrupted and continuous. IntelliJ IDEA even constantly saves your changes for you.
You don’t need to interrupt your thought process to remind yourself to save your work.

One of the reasons we encourage you to learn the keyboard shortcuts is to stay in the flow - when you’re
reading menu items or moving the mouse around, that split second of moving the focus off what you’re
trying to achieve can break your precious flow.

Being in the flow is about staying in your context for as long as possible. It helps if you can use the IDE to
do all the development-related tasks. Coding? Of course; Previewing files? Yes, absolutely; Seeing values in
the database? Yes (in IntelliJ IDEA Ultimate); Running queries (against a database or using a REPL)? Yes;
Rebasing, cherry-picking, re-writing history? Still yes; Managing version control remotes? Yes; Creating or
reviewing GitHub pull requests? Yes; Remote pair programming? You bet! IntelliJ IDEA excels at keeping
you in the flow.

If some functionality is not part of IntelliJ IDEA by default, there’s almost always a plugin you can use.
You’ll see more about plugins in Ch. 37, Working with plugins.

Bottom Line
• Keep an eye out for the always green, keyboard first, and in the flow elements
throughout this book. These concepts will help you get the most from your IDE.


Always green is about fixing errors as soon as they occur, making non-breaking changes as
you develop, and keeping your code compiling.

• Keyboard first is about learning the shortcuts to keep your fingers on the keyboard, which
speeds you up.

• In the flow is about that feeling you get when you’re happy creating your application and
not worrying about any ceremony or distracting tasks - IntelliJ IDEA takes care of those.

• You’ll also come across Try It sidebars too - it’s not always easy to describe exactly how IntelliJ
IDEA can help you, sometimes you need to see it for yourself.

Keyboard Shortcuts
(⇧⇧ | Shift+Shift) to open the Search Everywhere dialog

More information
• IntelliJ IDEA Keyboard Shortcuts Reference Card from JetBrains [https://tinyurl.com/33myzcsv]

• Search Everywhere [https://tinyurl.com/f2f4x84s] (IntelliJ IDEA online help)

23
Getting to Know IntelliJ IDEA (Community Edition)

3. Installing IntelliJ IDEA

Chapter Summary
• Which edition of IntelliJ IDEA should I use, Community or Ultimate?

• Which version should I install?

• What is JetBrains Toolbox, and why should I use it?

• Where do I find instructions for downloading and installing IntelliJ IDEA?

First, you need to install IntelliJ IDEA. If you’ve already done that, you can skip this chapter and head
straight to Ch. 4, IntelliJ IDEA out of the box.

If you’re wondering which edition of IntelliJ IDEA to install, start with IntelliJ IDEA Community Edition
because it’s free! Of course, if you have a subscription to use IntelliJ IDEA Ultimate, go ahead and use that.
All the examples in this book use IntelliJ IDEA Community Edition unless otherwise explicitly stated.

Install whichever is the most recent version of IntelliJ IDEA. This book is based on IntelliJ IDEA 2023.3.
Many features will be the same from version to version, but you will usually get the best performance and
most interesting features if you use the latest version of IntelliJ IDEA. IntelliJ IDEA usually suggests you
update it when a new version is released.

We recommend installing IntelliJ IDEA using the JetBrains Toolbox app. Alternatively, you can download
IntelliJ IDEA as a standalone application. You can find links to documentation for both approaches at the
end of this chapter.

Helen Hint
I love using the JetBrains Toolbox app to manage my IDEs. Yes, granted, I’m using
more than one IDE, but even if it was just one product, the Toolbox app is still
 helpful because it manages versions, including the Early Access Program (EAP),
settings and updates for me.

IntelliJ IDEA sets a dark theme when you first install it. However, we have used a light theme and
associated colour descriptions throughout this book because it’s easier to see the screenshots.

More information
• JetBrains Toolbox application [https://tinyurl.com/2xtb4p3w] (JetBrains Toolbox application)

• Installation Guide with the Toolbox app [https://tinyurl.com/4knnkcpd] (IntelliJ IDEA online help)

• Installation Guide as a separate application [https://tinyurl.com/yckjc937] (IntelliJ IDEA online help)

24
3. Installing IntelliJ IDEA

Bottom Line
• If you don’t have a subscription for IntelliJ IDEA Ultimate, you can install IntelliJ IDEA
Community for free.

• The JetBrains Toolbox app is a great way to manage updates to your products, especially if you
have more than one from JetBrains.

25
Getting to Know IntelliJ IDEA (Community Edition)

4. IntelliJ IDEA out of the box

Chapter Summary
• What should I expect to see the first time I open IntelliJ IDEA?

• How do I enable the New UI?

• What are the notifications and dialogs that open and what should I do about them?

• What are all the buttons and windows that are open, and do I need them?

• Why does the editor include text that isn’t part of my source code?

Now we have introduced you to the IntelliJ IDEA guiding principles and you’ve installed IntelliJ IDEA, it’s
time to go on a tour.

IntelliJ IDEA is a very powerful tool with a lot of features. We’re going to step through each area of the
interface.

4.1. Welcome screen


The Welcome Screen is where you can open an existing project by cloning it from version control or by
opening it from your local machine. You can also create a new project in the Welcome Screen.

26
4. IntelliJ IDEA out of the box

Try It!
If you have your own Java project that you want to use for this tour, you can press Open from the
Welcome Screen and navigate to it on your local machine. If your project is hosted somewhere like
GitHub, click Get from VCS and paste the link into the URL field, and then click Clone to clone your
project from version control to your machine.

Alternatively, you can create a really simple Java project:

1. Press New Project to start IntelliJ IDEA’s New Project wizard. If you don’t see the Welcome
Screen, you might have a project open already. In this case go to File > New > Project.

2. Give your project a name, such as "getting-started" and change the location if you want to.

3. Select the Create Git repository checkbox, so we can show you the VCS tool window in this
section.

4. You can leave the rest of the defaults in this dialog, but if you don’t have a JDK (Java Development
Kit) downloaded, click Download JDK and choose one from the list before you proceed with a
Java project. You can select both a version and a vendor here and IntelliJ IDEA will manage the
download and configuration of the JDK for you.

5. Press Create and IntelliJ IDEA will load your new project.

IntelliJ IDEA automatically saves its projects in a folder called 'IdeaProjects' in your home directory. On
Windows, this might look something like C:\Users\Trisha\Documents\IdeaProjects, and on macOS, it
might look something like this /Users/HelenScott/IdeaProjects.

Now, it’s time to show you around!

27
Getting to Know IntelliJ IDEA (Community Edition)

4.2. New UI
In this second edition of Getting to Know IntelliJ IDEA, we’re focussing exclusively on the "New UI". This
updated user interface was first introduced to beta users in IntelliJ IDEA 2022.3 and has been evolved and
gradually rolled out to more users since then.

The New UI might be on by default in your configuration, or you might need to switch it on manually
depending on your configuration. To enable it, go to your settings (⌘, | Ctrl+Alt+S) and search for new ui.
You can optionally select Compact mode if you prefer less space around the elements in your interface.
You will need to restart the IDE for the change to take effect.

Helen Hint
I prefer to use Compact mode in the New UI. You can enable it in your settings (⌘, |
 Ctrl+Alt+S) and search for New UI, then select the Compact mode checkbox.

28
4. IntelliJ IDEA out of the box

4.3. Tip of the day


IntelliJ IDEA shows you a short tip of the day by default each time you open the IDE. This tip is to help you
to learn a bit more about the IDE gradually and incrementally. It helps you to get the most from the
product and to find features that you didn’t know existed.

4.4. Balloon notifications


When opening a new project, most balloon notifications are IntelliJ IDEA informing you of decisions it has
made regarding your project and its structure. Usually, these decisions are the correct ones, so you can
dismiss these balloon notifications. If IntelliJ IDEA needs you to do something, there will be a link or a
button for you to click on.

Sometimes, these notifications may be questions for you about configuration in your project. For example,
sometimes the notification asks you about downloading pre-built indexes, which generally improves the
performance of IntelliJ IDEA. If you press Always download, IntelliJ IDEA won’t ask you about this again.

29
Getting to Know IntelliJ IDEA (Community Edition)

If you accidentally close the popup, or it disappears, click the Notifications tool window button, the bell in
the top-right. You’ll see all the messages and any "Call To Action" links or buttons.

A quick detour: shared indexes


Sometimes IntelliJ IDEA gives a notification about "Pre-built shared indexes", so although it’s not key to
understand this when you first open IntelliJ IDEA, it seems like a reasonable time to explain what it means.

IntelliJ IDEA can do many clever things because it indexes your project. We will talk about this in more
detail in IntelliJ IDEA’s Internal Map but the short version is that it reads all your files and figures out how
the project is structured and which technologies it uses.

This indexing process is usually a one-off when you first load the project and it can give the impression
that IntelliJ IDEA is slow to start, because it sometimes is, the first time. To speed up the process, IntelliJ
IDEA can download pre-built indexes for technologies your code uses - for example, for the version of Java
you’re using, and for common libraries and frameworks. This way, IntelliJ IDEA on your machine doesn’t
need to build all the indexes for all the code your project uses.

Downloading pre-built indexes can improve the performance of IntelliJ IDEA, particularly on the
initial startup. This functionality is available in IntelliJ IDEA Community for the first 30 days. If you need
the performance improvements from this feature, you should consider using IntelliJ IDEA Ultimate instead.

30
4. IntelliJ IDEA out of the box

4.5. Tool window buttons


Around the edges of IntelliJ IDEA, there are tool window bars that contain buttons that look a bit like tabs:
Project, Structure, Build and many more. These are the tool window buttons which open your Tool
Windows.

31
Getting to Know IntelliJ IDEA (Community Edition)

4.6. Tool windows


Tool Windows are the IDE panels that appear to the left, right, or below the editor. In the following
example, the Project tool window and Run tool window are both open.

When you’re getting started, the Project tool window is a great place to start. The Project tool window can
be used to see the files and folders in your project, and you can use it to open your code in the editor. You
can see all your tool windows by clicking on the ellipsis button on the left-hand side of your IDE.

32
4. IntelliJ IDEA out of the box

4.7. Main Toolbar


The Main toolbar is above the code in the editor. It shows icons, status and buttons which may be useful to
you throughout your project. From left to right:

• The main menu (Windows and Linux). Located under the hamburger icon on the top-left of the IDE.

• The project. Shows the project name and lets you switch between all your recent projects, create new
projects and open existing projects. You can assign a different colour to each of your projects as a visual
cue to help you quickly find the one you want.

• The current VCS branch, if your project is in version control. Clicking on this opens a menu that shows
your branches and contains VCS actions like update project and switch branches.

• Run/debug configurations. This widget shows you a list of your run configurations, as well as the run
and debug actions for the currently selected run configuration. You can make changes to your run
configurations here and see the state of any running processes, including debugging. We will cover
these features in much more detail in Ch. 27, Using Run Configurations effectively.

• Ch. 36, Pairing with code with me, Search Everywhere and Settings, all of which will be covered more in
the rest of the book.

4.8. Editor tabs


Your Editor Tabs sit at the top of the editor window, much like some browsers. They are a good visual
reminder of which files you have open.

You can also see the files you have recently accessed with Find Recent Files (⌘E | Ctrl+E).

33
Getting to Know IntelliJ IDEA (Community Edition)

4.9. Status bar


In the Status bar can be used to house different components depending on what you’re most interested in.
By default, you will see the Navigation bar on the left-hand side. The Navigation Bar shows the path to the
file you have open, even down to the method your caret is in. We will show you how to configure your
Status bar in Ch. 7, Tuning your IDE.

On the right-hand side of the Status bar is information about the file that’s open in the editor. For example,
line number, line endings and file encoding. There’s a lot of information here; you can right-click and hide
the information you’re not interested in.

4.10. Editor
Now, the most important part of the IDE - the editor! This is the main pane, where you write and edit your
code.

IntelliJ IDEA shows the text of your file as you’d expect, but it also decorates your code with hints and
information. The grey text inline with the code is called an Inlay Hint. The hints are usually helpful, but
some people find them distracting. See Ch. 7, Tuning your IDE to find out how to configure which hints are
shown.

34
4. IntelliJ IDEA out of the box

4.11. After upgrading


The out-of-the-box experience might be slightly different after upgrading, rather than a clean installation.
An upgrade keeps all your settings, so if you’ve previously hidden certain aspects of the interface, they
should still be hidden after an upgrade. We recommend that you read the "What’s New" page that opens in
the editor area. After an upgrade, this page describes the key features that have been updated or added in
this version.

Trisha Tip
I recommend giving the "What’s New" page a quick look since this is the best place
 to see if any interesting new features have been added or if there are any major
changes.

In this section, we introduced key areas of the user interface in IntelliJ IDEA. In the next section, we’ll give
directions on which areas of the IDE to look at and when.

You will notice that many of the screenshots in this book show a minimalistic user
 interface. This is because we have tuned the IDE to save space and show you the most
important information. You can learn how to tune your IDE when you’re ready.

More information
• Download pre-built indexes [https://tinyurl.com/mvj2kmfj] (IntelliJ IDEA online help)

• Customize actions, menus and toolbars [https://tinyurl.com/msufzzay] (IntelliJ IDEA online help)

35
Getting to Know IntelliJ IDEA (Community Edition)

Bottom Line
• You can create a new project, open an existing project on your machine or clone a project from
VCS in the Welcome Screen.

• The Tip of the Day is a great way to learn new things about IntelliJ IDEA.

• The New UI is cleaner, less cluttered and easier to work with.

• Balloon notifications give you helpful information about your project. If you dismiss a balloon
notification and want to get it back, you can click on the notification bell icon in the bottom-right
corner of your screen.

• Tool window buttons appear around the edge of your screen; clicking them opens the
corresponding tool window.

• The Status Bar contains your Navigation bar by default, as well as information about the current
file.

Keyboard Shortcuts
(⌘1 | Alt+1) to open the Project tool Window
(⌘4 | Alt+4) to open the Run tool Window
(⌘9 | Alt+9) to open the Git tool window
(⌃⌥R | Alt+Shift+F10) to display the Run Configurations dialog
(⌘E | Ctrl+E) to display the Recent Files dialog
(⇧⌘A | Ctrl+Shift+A) to open the Find Action dialog
(⇧⇧ | Shift+Shift) to open the Search Everywhere dialog
(⇧⌘F12 | Ctrl+Shift+F12) to hide all the tool windows
(⌘, | Ctrl+Alt+S) to open the Settings dialog
(⎋ | Escape) to exit a dialog, or return focus to the editor

36
5. Where to look

5. Where to look

Chapter Summary
• What are the different areas of the IDE?

• Where should I be looking when I want more information?

• How can I use the information in the editor?

• What are tool windows and where can I find them?

• Where are the Settings for IntelliJ IDEA?

When you’re working in IntelliJ IDEA or any IDE, it’s helpful if you have a good idea on which places you
should look for information, support, and of course, help.

In this chapter we will provide guidance, so you can train your eyes to automatically look at the right
areas. In time, this will become second nature to you, but if you’re new to IntelliJ IDEA, it’s helpful to know
where to start.

5.1. In the editor


These are the things that are likely to get your attention in the editor.

Errors happen, and IntelliJ IDEA tells you about them immediately, so you can fix them straight away. If
you have the code below in your editor, you will see an error.

IntelliJ IDEA gives you the right information in the right place at the right time. You can press (⌥⏎ |
Alt+Enter) to get IntelliJ IDEA to give you suggestions for fixes.

You also see context-sensitive information, which is shown with yellow highlights for warnings and
suggestions, grey text for unused/unnecessary code, and wiggly underlines for spelling and grammar. You
can see more details about the problem by hovering the mouse over it.

When you press (⌥⏎ | Alt+Enter) here, IntelliJ IDEA gives information about the problem and usually
suggests solutions.

If you’re in the zone writing code, we suggest you look at warnings later. They’re optional suggestions
for you to investigate - your code compiles, but there may be an alternative way to write it.

37
Getting to Know IntelliJ IDEA (Community Edition)

5.2. Gutter icons


Gutter icons give you context-sensitive actions. The "gutter" is the grey area to the left of the code, where
the line numbers are. Gutter icons can help you do something with the code in that spot. For example, you
can run it, navigate to related code, or see that code’s history.

Runnable code has a green run icon next to it. A green arrow at the top of a file lets you run all the tests,
methods, or functions in that file.

Some gutter icons let you navigate to related interfaces, superclasses and subclasses.

Clicking on the gutter icon on line 4 takes you to the method implementation in the class that implements
that interface. From there you can navigate back to the superclass method.

The gutter also shows you the changes that have been made to the visible lines of code since this file was
last committed to version control. You can see at a glance if the code has been added (green), changed
(blue) or deleted (grey).

When you click on these markers, you can get an overview of the changes.

You can roll back the changes from here or show the diff view if you want more detail.

38
5. Where to look

If you’re using a framework like Spring or Jakarta EE, you’ll see specific icons in the gutter. We recommend
hovering over or clicking these icons to figure out how they can help you.

Support for some frameworks, for example, Spring, is only available in IntelliJ IDEA Ultimate.

5.3. Right scrollbar


The scrollbar to the right of the editor gives you information about the whole file at a glance. You’ll see red
markers for errors in the file, yellow markers for warnings, and blue markers for todo items, which we’ll
see in more detail in Ch. 35, Managing work TODO. You can navigate directly to the corresponding part of
the code by clicking on the coloured marker in the scrollbar.

You can use the right-hand scroll bar to quickly see, for example, that you have three todo comments, some
new code and some warnings you need to look into.

Trisha Tip
Effectively the scroll bar on the right shows you the whole file at a glance without
 the file needing to fit on one screen. In contrast, information on the left-hand scroll
bar is shown only for the lines currently visible in the editor.

You can hover over a marker in the right-hand scroll bar to see what it marker represents, IntelliJ IDEA
shows a description of any problems. If the code the marker applies to is not visible in the editor, IntelliJ
IDEA shows a preview of the code in question.

39
Getting to Know IntelliJ IDEA (Community Edition)

5.4. Status Bar


In the New UI, by default the IntelliJ IDEA will show the navigation to the current file and method on the
left of the Status bar.

The navigation bar and the information on the right of the status bar may give you some context in terms
of where you are and what settings the current file has.

However, you can change the status bar to display useful messages instead. For example, it will show you
the last notification you received, or give you information about the warning or error your caret is on. You
can turn this on by enabling the Status Bar Widgets: Status Text, we’ll talk about how to do this in Ch. 7,
Tuning your IDE.

Trisha Tip
I highly recommend showing the status message in the status bar. The status
 message should be one of the first things you check if you want to know if your last
action was successful or if you suspect some error needs to be fixed.

40
5. Where to look

5.5. Notifications window


If you click on a message in the status bar it will open the Notifications tool window, where you can see the
history of all the messages. This is another useful source of information about what has happened in your
project. You can also open this by clicking on the bell tool window button in the top right.

5.6. Tool windows


The correct IntelliJ IDEA tool window will open at the right time. For example, if you run your code, the
Run tool window opens. Similarly, IntelliJ IDEA opens the Problems tool window when you click on a
problem icon at the top of the right-hand scroll bar.

You may want to hide the tool windows (⇧⌘F12 | Ctrl+Shift+F12) when you’re coding to stop yourself
from getting distracted. This means that your eyes are always focused on the code and the code-related
information in the editor. You may want to look at the information in a tool window when you "surface"
from your coding-flow.

The tool windows you’re likely to want to look at are:

• The Commit tool window] (⌘0 | Alt+0) to see which changes you’ve made.

• The Project tool window (⌘1 | Alt+1) to see all the files in your project.

• The Run tool window (⌘4 | Alt+4) to see the output of running your code.

• The Git tool window (⌘9 | Alt+9) to see the status of your Git repository.

Helen Hint
You can always use (⎋ | Escape) to put the focus back in the editor rather than the
 tool window at any time.

41
Getting to Know IntelliJ IDEA (Community Edition)

5.7. Dialogs
There are lots of dialogs in IntelliJ IDEA, so here are some tips to guide you through them:

• Escape (⎋ | Escape) closes any dialog without saving any changes you have made.

• You can often use Find Action (⇧⌘A | Ctrl+Shift+A) and then type in the name of the thing you’re
looking for to display the dialog, for example “rearrange code”.

• Almost all dialogs are searchable. That means you can type directly into any dialog box to find the
thing you’re looking for. This is especially useful in the Settings dialog (⌘, | Ctrl+Alt+S), but can also be
valuable in smaller dialogs such as Find Recent Locations (⇧⌘E | Shift+Ctrl+E).

• Some dialogs have checkboxes in them. You can use the same keyboard shortcut to load the dialog to
toggle the checkbox selection on and off. That means there’s no need to reach for the mouse to select
the checkbox. We’ve not found anywhere this doesn’t work yet, but we’ve not checked every dialog
box!

5.8. Seeing or changing your settings


You may have to look at your Settings (⌘, | Ctrl+Alt+S) if you need to understand more about how your IDE
is set up. You can also configure integrations here, for example, GitHub, VCS, Gradle, Maven, as well as
plugins and the appearance of your IDE.

It takes time to understand all these settings, so we recommend that you don’t look at every single setting
to start with. As you read this book, we’ll walk you through the settings you’ll need and how best to change
them.

42
5. Where to look

Helen Hint
Search Everywhere (⇧⇧ | Shift+Shift) should become your new best friend,
 especially when you’re new to IntelliJ IDEA.

We discuss the Settings dialog in Ch. 42, Changing IntelliJ IDEA settings in Part IV.

5.9. Finding your JDK


Use Project Structure (⌘; | Ctrl+Alt+Shift+S) to configure your Java Development Kit (JDK) and Language
level.

We explore this more in Ch. 40, Deciphering the Project Structure dialog in Part IV.

More information
• Language level [https://tinyurl.com/yw8jvvep] (IntelliJ IDEA online help)

43
Getting to Know IntelliJ IDEA (Community Edition)

Bottom Line
In this section, we’ve tried to give some directions and signposts to areas of the IDE to pay attention
to at particular times. The rest of the book covers many of these areas in much more detail. For now,
you should know what you need to pay attention to.

• The editor is context-aware and gives you visual hints to help you fix errors as you go keeping
your code always green.

• The left-hand gutter may contain gutter icons which help you with running an application,
navigation and frameworks such as Spring.

• The left-hand gutter shows changes in that file if it’s in version control.

• The right-hand scroll bar shows you helpful information about the full file at a glance, including
red markers that indicate errors.

• The Status Bar shows you errors, warnings and information with colour-coded icons and your
version control status. You can also access your notifications from the Status Bar.

• Your Settings and Project Structure (⌘, | Ctrl+Alt+S) dialog are just a shortcut away and allow you
to see and configure all the aspects of your project, but you don’t need to dive in there straight
away. You can use Search Everywhere (⇧⇧ | Shift+Shift) to find settings too.

Keyboard Shortcuts
(⌥⏎ | Alt+Enter) to get suggestions and fixes
(⇧⇧ | Shift+Shift) to open the Search Everywhere dialog
(⇧⌘F12 | Ctrl+Shift+F12) to hide all tool windows
(⌘, | Ctrl+Alt+S) to open the Project Settings dialog
(⌘; | Ctrl+Alt+Shift+S) to open the Project Structure dialog
(⎋ | Escape) to put the focus in the editor at any time

44
6. How IntelliJ IDEA sees your project

6. How IntelliJ IDEA sees your project

Chapter Summary
• What is an IntelliJ IDEA project?

• How does IntelliJ IDEA figure out where my source and test files are?

• Do I need to configure IntelliJ IDEA to be able to compile and run your code?

• What are IntelliJ IDEA modules, and why might I use them?

• How can I see if my project is using a Version Control System (VCS)?

• What are plugins and why would I use them?

In this chapter, we will explain how IntelliJ IDEA interprets the structure of your project and represents it.
We will talk about how IntelliJ IDEA builds up its own model of your project, enabling the most useful
functionality of the IDE, like immediate feedback for errors, and suggestions for improvements. Ultimately,
if you understand how IntelliJ IDEA models your code, it will help you to work more effectively with your
project.

6.1. IntelliJ IDEA’s view of your project


When you ask IntelliJ IDEA to create a project from the contents of a folder, it looks in that directory and
tries to find a file that it can turn into an IntelliJ IDEA project. That might be a Maven pom.xml file, a
build.gradle, IntelliJ IDEA settings files or settings files from other IDEs. If IntelliJ IDEA can’t find any of
these files, it still makes a good guess about the project’s structure based on the code itself.

Your application may contain a single module or several different modules, but it’s all represented as an
IntelliJ IDEA project. For newer projects, you probably have a .idea folder that contains configuration
files which IntelliJ IDEA uses to load the projects. We will explore this further in Ch. 41, Looking in your
.idea folder in part IV. Older IntelliJ IDEA projects may have .ipr (IntelliJ IDEA Project) files that, again,
IntelliJ IDEA can use to load the project and its modules.

6.2. IntelliJ IDEA’s internal map


IntelliJ IDEA performs indexing when opening a new project inside the IDE. It can take a while, and some
functionality is unavailable to you while IntelliJ IDEA is indexing. Indexing is IntelliJ IDEA’s way of
building its internal map for your code. By indexing your code while you make a coffee, IntelliJ IDEA will
be able to do cool things like navigating by class or symbol, rather than just by file as any operating system
can. Indexing also allows IntelliJ IDEA to support you with refactoring. Let’s think about that for a moment.

By performing indexing, IntelliJ IDEA builds up a complete map of your code. This means that it
understands the structure of your code. Let’s say you want to rename a method; IntelliJ IDEA can rename
the place that method is declared and everywhere that calls that method in a single operation because of
its internal map. IntelliJ IDEA’s Inspections are also enabled through indexing. This means IntelliJ IDEA can
warn you about issues in real-time, not at a later date. This is why IntelliJ IDEA indexes when you first load
a project; it is building its internal map of your project so it can help you at a later date.

IntelliJ IDEA Ultimate can download pre-built indexes for certain languages, frameworks and

45
Getting to Know IntelliJ IDEA (Community Edition)

libraries. The index for Java 17 for your project is the same for your computer, our laptops, and everyone
else’s; there’s no need for all our computers to build an index for common code each time.

6.3. Finding your code


If you’re using a common file structure, such as src/main/java, IntelliJ IDEA should be able to find, mark,
and configure your code files.

Your project shape determines which tool windows are available. For example, if you are using Maven or
Gradle, IntelliJ IDEA enables a Maven or Gradle tool window, respectively.

46
6. How IntelliJ IDEA sees your project

IntelliJ IDEA uses the build tool configuration to figure out where your source code, test sources and
resource files are.

Helen Hint
The Project tool window also lists the external dependencies, which are labelled
according to where they were defined, for example, Maven or Gradle. The Project
 tool window is a good place to find the version of Java you’re using, that is, the
version of your JDK.

6.4. Projects and workspaces


There are some notable differences between how IntelliJ IDEA manages project structure and how IDEs
such as Eclipse manage project structure. For example, in Eclipse, you have one workspace that contains
multiple projects which may or may not be related. In IntelliJ IDEA, usually one window contains a single
project. You can have multiple windows, but the mapping is one window to one project.

Rather than put multiple project in the same window, IntelliJ IDEA offers a couple of ways to easily switch
between open projects.

• Using the Project widget in the window header. From here, you can switch to another open project or
quickly select a recent project. You can also open another project from your computer or source
control, or create a new project.

• If you’re using macOS, you can have all your open projects as tabs at the top of the IDE. Go to Window >
Merge All Project Windows.

47
Getting to Know IntelliJ IDEA (Community Edition)

When you select this, all your projects appear as tabs at the top of your window.

IntelliJ IDEA does have the notion of modules. A project can contain several modules which are related.
This is one way to handle the complexity of the real world - split a project into multiple modules as it
grows. Each module is represented as a folder with a name in bold in the Project tool window.

6.5. Establishing Version Control status


IntelliJ IDEA also shows you if your project is using a version control system. There are a few ways to check
this, but the easiest way is to look at the VCS widget in the Main toolbar at the top. If you see Version
Control then you’re project isn’t yet under any version control.

48
6. How IntelliJ IDEA sees your project

Alternatively, if it shows the name of the current branch, with a branch icon, the project is using version
control.

Alternatively, you can look in the VCS menu and see if you have an Enable Version Control Integration
option. This is shown if the project isn’t using a version control system yet.

If you are using Git, you will see a Git menu instead of a VCS menu. This menu includes options such as
Commit, Push, and Update project. If you’re using Mercurial, the menu will be called Hg. For other
version control systems, you may see a VCS menu with extra options for your version control system.

49
Getting to Know IntelliJ IDEA (Community Edition)

6.6. IntelliJ IDEA Ultimate Framework support

IntelliJ IDEA Ultimate supports several frameworks, for example, Spring, Spring Boot, Micronaut,
Microprofile, Jakarta EE and many more. You can code with these frameworks in IntelliJ IDEA Community
Edition; however, the difference is that IntelliJ IDEA Ultimate gives you lots of help with the supported
frameworks.

IntelliJ IDEA Ultimate automatically turns on support for the libraries and frameworks you use in
your project. You can check and confirm this by going to your Project Structure (⌘; | Ctrl+Alt+Shift+S) and
navigating to the Facets. For example, if you’re working with a Jakarta EE project in IntelliJ IDEA Ultimate,
you should see that the JavaEE Application facet has been added to your project.

We’ll talk about facets a little more in What is an IntelliJ IDEA Facet? in Part IV.

6.7. Plugins and your project


In addition to the framework support in IntelliJ IDEA, some frameworks have support through a third-
party plugin. If IntelliJ IDEA detects that you’re using functionality supported by a plugin, it suggests you
install it. If you’re working with a framework that doesn’t seem to be supported out of the box with IntelliJ
IDEA, we recommend checking if there’s any plugin support. We give some pointers for Working with
plugins in Part IV.

More information
• Inspections [https://tinyurl.com/ydwrj9ds] (IntelliJ IDEA online help)

• Pre-built indexes [https://tinyurl.com/mvj2kmfj] (IntelliJ IDEA online help)

50
6. How IntelliJ IDEA sees your project

Bottom Line
• IntelliJ IDEA creates its internal map of your project when it indexes it.

• Your build tool defines the shape of your project, and IntelliJ IDEA understands how to structure
your project, often based on a Maven pom.xml file or a Gradle build.gradle.

• Your .idea folder contains your specific project configuration.

• Each window contains a single project in IntelliJ IDEA; there is no notion of a workspace.

• You can establish if your project is in version control by seeing if you have a VCS menu.

• Plugins provide additional framework support as well as extend some areas of functionality in
IntelliJ IDEA.

Keyboard Shortcuts
(⌘1 | Alt+1) to open the Project tool window
(⌘, | Ctrl+Alt+S) to open the Settings dialog
(⌘; | Ctrl+Alt+Shift+S) to open the Project Structure dialog

51
Getting to Know IntelliJ IDEA (Community Edition)

7. Tuning your IDE

Chapter Summary
• An opinionated viewpoint on the Status bar and Editor Tabs in the IDE

• Working with various tool windows in the IDE

• Configuring Inlay Hints to suit your needs

You might notice that the screenshots in this book look a little different to your IDE, especially out-of-the-
box. That’s because we tuned the IDE to hide some of the elements in the interface as we both prefer to
focus on a keyboard first approach for accessing this functionality, rather than the mouse.

When you first start IntelliJ IDEA, your interface will look similar to this. We appreciate that this is a busy
screenshot, but it’s helpful for orientation.

In addition, IntelliJ IDEA is an enterprise product with a lot of features, meaning it’s impossible to surface
all the available functionality when you first load the product. IntelliJ IDEA gives you icons and pop-ups for
features, which will help you to do the most common things fastest. This is helpful for new users and also
for giving visibility to new features.

We’re now going to take you on an entirely opinion-based journey about what we like to hide in the user
interface and why. As always, the choice is yours.

52
7. Tuning your IDE

7.1. Startup Tips


We recommend keeping these turned on while you’re learning IntelliJ IDEA. Even experienced users will
discover things they didn’t know about the IDE. However, if you dismiss them routinely, you can turn them
off by selecting the Don’t show tips checkbox. You can enable them again in your Settings (⌘, | Ctrl+Alt+S)
later if you want to.

7.2. Main Toolbar


We like the Main toolbar because it groups icons into sensible areas of functionality, and these are features
you’re probably going to use a lot. If you have enough space on your monitor, we would keep it visible.

However, as always, you can turn off this toolbar if it doesn’t work for you in the menu with View >
Appearance > Toolbar or by searching for Main toolbar with (⇧⇧ | Shift+Shift) Search Everywhere.

7.3. Status Bar


By default, the Status bar shows navigation information for your project. We recommend you change this
setting so notifications from your IDE are displayed here instead. To do that, use (⇧⇧ | Shift+Shift) to open
Search Everywhere, and type in "status bar widgets" and enable Status Bar Widgets: Status Text.

This will hide the navigation information for the project and show the notification messages instead in
your Status bar.

53
Getting to Know IntelliJ IDEA (Community Edition)

The right-hand side of the Status bar can be configured to show more or fewer icons. Right-click on the
status bar to see a list of items to toggle on and off

We like to work with the line and column number of where the caret is in the editor. It’s helpful to have the
notifications icon so you can see if there are new notifications and easily open the notifications window. It
can also be useful to see the Indentation settings.

7.4. Editor Tabs


Editor Tabs are useful in some scenarios but once you get used to using Recent Files (⌘E | Ctrl+E) to
navigate around your working files, along with (⌘W | Ctrl+W) to close tabs, you can turn them off and not
worry about seeing which files you have open in your editor.

To turn the editor tabs off, use (⇧⇧ | Shift+Shift) to open Search Everywhere again. Type "tab
placement" and use the arrow keys to move down to the setting for Tab placement | None. Press (⏎ |
Enter) to toggle this setting on.

If you like the Editor Tabs to be on but don’t want them to fill up with files that you’re just taking a quick
look at, you can turn on the Enable Preview Tab from the (⌘, | Ctrl+Alt+S) Settings. This means that files
you click once in your Project tool window will be displayed in the preview tab, indicated by italics in the
associated Editor Tab. If you double-click a file or press (⏎ | Enter) on a file, it will open as normal in your
editor and consume an editor tab as you expect.

54
7. Tuning your IDE

Trisha Tip
Editor Tabs can be a helpful reminder of what you’ve been working on and your
current context. The first time someone suggested I turn them off, I was horrified!
How was I supposed to remember what I was working on if I couldn’t see which
 files were open?! However, I started using Find Recent files (⌘E | Ctrl+E) instead
and quickly decided that this was my favourite way to see my current context. Now I
always hide Editor Tabs.

7.5. Tool windows and their buttons


Tool windows are easily accessed with keyboard shortcuts, however the tool window buttons around the
edge of the UI don’t take up too much space if you prefer to use them instead. You can turn them off if you
prefer, especially since the shortcuts for showing the tool windows all follow the same base pattern:

• (⌘0 | Alt+0) Commit tool window

• (⌘1 | Alt+1) Project tool window

• (⌘2 | Alt+2) Bookmarks tool window

• (⌘3 | Alt+3) Find tool window

• (⌘4 | Alt+4) Run tool window

• (⌘5 | Alt+5) Debug tool window

• (⌘6 | Alt+6) Problem tool window

• (⌘7 | Alt+7) Structure tool window

• (⌘8 | Alt+8) Services tool window

• (⌘9 | Alt+9) VCS tool window

We have hidden the tool window buttons for most of the screenshots in this book to give us more space to
show whatever it is we’re trying to demonstrate in the screenshot. If we’re working on a large enough
monitor, we’ll generally leave them visible in the IDE.

To hide the tool window buttons around the edges of your editor, you can use (⇧⇧ | Shift+Shift) and
type "window button". Press (⏎ | Enter) on View | Appearance: Tool Window Bars to hide them.

You can also press (⇧⌘F12 | Ctrl+Shift+F12) at any time to hide all the tool windows, including any
that are open.

55
Getting to Know IntelliJ IDEA (Community Edition)

7.6. Inlay Hints


You can configure which inlay hints you want visible in your editor in your Settings dialog (⌘, |
Ctrl+Alt+S). Find the Inlay hints either by:

• Navigating with the hierarchy on the left-hand side of the dialog: Editor → Inlay Hints

• Typing "inlay" to narrow down the settings shown

Trisha Tip
I prefer to turn the author hints off, but I haven’t tried it on a project with many
 authors. I know plenty of people who use other JetBrains IDEs that have had this
feature in for longer, and they love code vision and its insights.

Depending on which aspects of the user interface you choose to turn off, the IDE will be more code-
focused:

56
7. Tuning your IDE

Bottom Line
We recommend changing the Status bar to show your notifications and turning off Editor Tabs to
maximise the editor window. You may also want to turn off your toolbar buttons and tune the inline
hints and other editor features.

It may take time to get used to this streamlined IDE, but it minimises distractions and helps you focus
on your code.

Keyboard Shortcuts
• (⎋ | Escape) will get you back to the editor irrespective of where you are

• (⌘, | Ctrl+Alt+S) to configure your interface settings in your preferences

• (⇧⌘E | Shift+Ctrl+E) to access your current working context in recent files

• (⇧⌘A | Ctrl+Shift+A) to find a dialog you want

• (⌘W | Ctrl+W) to close an Editor Tab

• (⇧⇧ | Shift+Shift) to open the Search Everywhere dialog

• (⇧⌘F12 | Ctrl+Shift+F12) to minimise all open tool windows

• (⌘0 | Alt+0) to open the Commit tool window

• (⌘1 | Alt+1) to open the Project tool window

• (⌘2 | Alt+2) to open the Bookmarks tool window

• (⌘3 | Alt+3) to open the Find tool window

• (⌘4 | Alt+4) to open the Run tool window

• (⌘5 | Alt+5) to open the Debug tool window

• (⌘6 | Alt+6) to open the Problem tool window

• (⌘7 | Alt+7) to open the Structure tool window

• (⌘8 | Alt+8) to open the Services tool window

• (⌘9 | Alt+9) to open the VCS tool window

57
Getting to Know IntelliJ IDEA (Community Edition)

8. Where to get help

Chapter Summary
• Where is the documentation kept?

• What kind of help is available for me?

• How can I contact IntelliJ IDEA Support?

Despite our best efforts, this book cannot cover everything because the IDE is released three times a year
and, rather wonderfully, is continually evolving. We know you might need help at some point so here are
some places to look if you need more information or get stuck.

We’ve added links to all the resources that we’ve mentioned here at the bottom of this chapter.

8.1. IntelliJ IDEA’s YouTube channel


IntelliJ IDEA has an extensive history on its YouTube channel. It covers IDE tips such as how to simplify
your code, tutorials such as how to use JUnit 5 and feature videos such as code completion. The YouTube
channel also has lots of valuable content from people in the community.

8.2. IntelliJ IDEA’s online help


The online help is the reference documentation for IntelliJ IDEA. You can access it by going to IntelliJ
IDEA’s Online Help, by pressing (⇧⌘F1 | F1), or by clicking on the "?" icon in any dialog. However, it’s just
as fast to use your favourite search engine and add the words IntelliJ IDEA in your search criteria. Your
results will include pages from the online help.

The online help should be your first port of call when you want to learn how to do something or get help
with a specific feature. Often the team at JetBrains also embed videos into the help pages if they relate to
the content on that page. Given that, we have added several links to the online help for specific features in
some chapters of this book. This is so you know the help pages to go to if you want to explore the
functionality further.

58
8. Where to get help

8.3. IntelliJ IDEA’s Feature Trainer


The Feature Trainer has been expanded since the first edition of this book and it helps you to learn more
about how IntelliJ IDEA works through interactive training courses inside the IDE. Some of the lessons
include refactoring code, navigating through projects, and Git. You can access it from Help > Learn IDE
Features as well as on from the Learn tab on IntelliJ IDEA’s home page.

8.4. JetBrains Guide


The JetBrains Guide has grown from strength to strength. You can search through tips and tutorials to see if
you can solve your problem and there are lot of new resources that are applicable to all IntelliJ-based IDEs.

8.5. IntelliJ IDEA’s Blog


IntelliJ IDEA also has an active blog. The blog is a good place to follow to get news, but there are also many
tutorials and tips here. Sometimes the tips are nestled deep in a "What’s New in IntelliJ IDEA" blog post
from years ago, but a search in your favourite browser or on the IntelliJ IDEA blog will retrieve them. The
blog also has detailed tutorials on technologies and more general concepts like how to use IntelliJ IDEA to
identify and fix code smells.

8.6. IntelliJ IDEA Community Forums


You can also go to the IntelliJ IDEA Users Community Forum to browse questions that the community have
asked, upvote them, or add your own.

8.7. IntelliJ IDEA YouTrack


Finally, if you have an error or cannot get something to work, your best bet is to raise an issue for IntelliJ
IDEA in YouTrack. JetBrains Support is quick to triage problems, and if they can’t answer immediately, they
might point you to a related issue or ask for more detail so they can help you out.

8.8. Stack Overflow


For certain specific issues and tips, you’ll often find a solution on Stack Overflow, given its role as a crowd-
sourced question-and-answer platform. Sometimes that answer has even been provided by these authors!

More information
• IntelliJ IDEA online help home page [https://tinyurl.com/w599cm8s] (IntelliJ IDEA online help)

• IntelliJ IDEA’s feature trainer [https://tinyurl.com/48cnu22e] (IntelliJ IDEA online help)

• IntelliJ IDEA on YouTube [https://tinyurl.com/2wumy49h] (IntelliJ IDEA YouTube channel)

• IntelliJ IDEA Blog [https://tinyurl.com/5n6kf9vh] (IntelliJ IDEA blog home page)

• IntelliJ IDEA Guide [https://tinyurl.com/2p88r9ct] (IntelliJ IDEA Guide homepage)

• IntelliJ IDEA in YouTrack [https://tinyurl.com/2p9chtsx] (IntelliJ IDEA YouTrack project)

• IntelliJ IDEA Users' Community [https://tinyurl.com/yzsd2utx] (IntelliJ IDEA support forum)

• Stack Overflow [https://stackoverflow.com/] (Stack Overflow website)

59
Getting to Know IntelliJ IDEA (Community Edition)

Bottom Line
• There are many places you can go to get help on IntelliJ IDEA.

• Each of the places listed has a different approach, and the right one for your problem depends on
your search term and learning style.

• You can raise a ticket with JetBrains if you need to.

60
Part II: Working with code
In Part II, we’ll look at how IntelliJ IDEA helps you to write and read code. We recognise that this is a large
part of what developers are doing in their day-to-day work. We’ll:

• Introduce the key features that help you write code by walking you through a simple but complete
tutorial.

• Look at how code completion and generation reduce errors in your code and frees you up to work on
more interesting things.

• Show you how to write code that works first, and then use IntelliJ IDEA’s suggestions to reshape it
afterward.

• Give you lots of shortcuts and tips for working with code.

• Show you how to move through your code with keyboard shortcuts.

• Talk about how IntelliJ IDEA can help you to read and understand code.

This part will focus on writing and reading code while introducing some related topics like running and
testing. We will look at these topics in more detail, and introduce more, in Part III.

Where to find more


You are reading the community version of this book, thank you for that! This free community version
contains all of Part I of Getting to Know IntelliJ IDEA, but does not include Parts II, III and IV.

If you want to read more, you can:

1. Buy the full version of Getting to Know IntelliJ IDEA. The eBook and PDF versions are available on
Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA], and the paperback version is on Amazon [https://a.co/
d/27KC3YN].

2. Buy the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea] from
Leanpub. This hands-on course covers everything from Part II of the book.

3. Buy the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/


developingapplicationswithintellijidea] from Leanpub. This hands-on course covers everything from Part III
of the book.

More information
• PDF and eBook from Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA]

• Paperback and Kindle book from Amazon [https://a.co/d/27KC3YN]

• Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea]

• Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/developingapplicationswithintellijidea]

61
Getting to Know IntelliJ IDEA (Community Edition)

9. Writing code

Chapter Summary
• How do I create a new project in IntelliJ IDEA?

• How do I get IntelliJ IDEA to generate standard code?

• How do I get IntelliJ IDEA to complete my code for me so it compiles?

• How do I use move around my code while I’m writing it?

• How do I run code in IntelliJ IDEA?

This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

62
10. Creating code quickly

10. Creating code quickly

Chapter Summary
• What sort of suggestions can IntelliJ IDEA offer while I’m coding?

• How can I get IntelliJ IDEA to generate common code for me?

• How does IntelliJ IDEA help me to keep my code compiling, even when I’m coding something
new?

10.1. Suggestions while you type

10.2. Type-sensitive suggestions

10.3. Just keep typing

10.4. Complete your code’s structure

10.5. Generate common code structures

10.6. Create a new…

10.7. Generate from missing code


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

63
Getting to Know IntelliJ IDEA (Community Edition)

11. Fixing and changing your code

Chapter Summary
• What do the red and yellow warnings mean in IntelliJ IDEA?

• How can IntelliJ IDEA fix or improve my code?

• How can IntelliJ IDEA help me if I think my code could be written differently?

11.1. See suggestions in the editor

11.2. Fix errors

11.3. Improve code

11.4. Change code

11.5. Check spelling


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

64
12. Activating your muscle memory with Keyboard Shortcuts

12. Activating your muscle memory with


Keyboard Shortcuts

Chapter Summary
• What’s so special about using the keyboard?

• How can I help myself to learn more shortcuts?

• Which are some editor shortcuts that speed up writing code?

12.1. Focus on the editor

12.2. "Get me out of here"

12.3. Extra-fast copy/cut line

12.4. Duplicate line or selection

12.5. Delete line

12.6. Format code


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

65
Getting to Know IntelliJ IDEA (Community Edition)

13. Moving through your code

Chapter Summary
• How can I quickly find something, whether it’s in my project code or in the IDE itself?

• How can I easily move through the code I’m working on?

• What shortcuts can I use to get a better understanding of the code and how it works?

13.1. Finding anything

13.2. Viewing and opening recent files

13.3. Viewing and moving to recent locations

13.4. Going to a specific line

13.5. Moving backward and forward through code

13.6. Moving between your code and its test

13.7. Finding where this code is used

13.8. Seeing details of the code you are calling


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

66
14. Understanding code

14. Understanding code

Chapter Summary
• How does IntelliJ IDEA help me to understand code in the editor?

• What extra information can IntelliJ IDEA show me to give me more context for the code?

• How can I hide lines that I find distracting?

• Where are some other places to look that give me more information about what the code is doing
and how it has changed?

14.1. Hints in the editor

14.2. API and documentation at a glance

14.3. Readable code documentation

14.4. Hide distracting code

14.5. Syntax highlighting for embedded code

14.6. Code use and data values

14.7. Understanding the flow of your code

14.8. Understanding changes over time

14.9. Getting insight into the code’s intended behaviour


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part II in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/
workingwithcodeinintellijidea].

67
Getting to Know IntelliJ IDEA (Community Edition)

Part III: Developing applications


In Part III, we’re going to build on what we learned about writing code and take you through tutorials to
build the extra skills you need for working with real-world applications. We’re going to:

• Go through the options for opening different types of projects, including getting them from a version
control server.

• Show several ways to run an application inside IntelliJ IDEA, so you can pick an approach that works
for your workflow.

• Debug an application, so you can learn how IntelliJ IDEA’s debugger can help you see an application’s
state—and how it changes—while it’s running.

• Use tests to drive the design and implementation of a small application, and see how IntelliJ IDEA’s
approach to testing makes it simple to write correct code.

• Show you how to combine automated tests with debugging to troubleshoot problems without having to
debug the whole application.

• Add a new dependency to your project, so you can see how to use external libraries.

• Introduce you to using build tools such as Maven or Gradle with your project.

• Take you through using a version control system to track versions of your project code.

After you’ve got a good handle on these topics, in Part IV we’ll move on to specific IntelliJ IDEA features
that support you while you’re developing applications.

Where to find more


You are reading the community version of this book, thank you for that! This free community version
contains all of Part I of Getting to Know IntelliJ IDEA, but does not include Parts II, III and IV.

If you want to read more, you can:

1. Buy the full version of Getting to Know IntelliJ IDEA. The eBook and PDF versions are available on
Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA], and the paperback version is on Amazon [https://a.co/
d/27KC3YN].

2. Buy the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea] from
Leanpub. This hands-on course covers everything from Part II of the book.

3. Buy the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/


developingapplicationswithintellijidea] from Leanpub. This hands-on course covers everything from Part III
of the book.

More information
• PDF and eBook from Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA]

• Paperback and Kindle book from Amazon [https://a.co/d/27KC3YN]

• Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea]

• Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/developingapplicationswithintellijidea]

68
15. Opening a project

15. Opening a project

Chapter Summary
• How can I open my existing code in IntelliJ IDEA?

• Does IntelliJ IDEA need special instructions if the project uses a build tool like Maven or Gradle?

• How can I clone a project from GitHub?

15.1. How IntelliJ IDEA uses your project’s build tool

15.2. Cloning a project from GitHub


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

69
Getting to Know IntelliJ IDEA (Community Edition)

16. Running your code

Chapter Summary
• How do I run application code in IntelliJ IDEA?

• Where can I see the output of running code in IntelliJ IDEA?

• Is there an easy way to re-run an application or test?

• How can I stop applications or services that are running in IntelliJ IDEA?

16.1. Re-running an application

16.2. Terminating a process


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

70
17. Debugging your code

17. Debugging your code

Chapter Summary
• How do I debug an application in IntelliJ IDEA?

• How does the debugger help me to understand my application?

This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

71
Getting to Know IntelliJ IDEA (Community Edition)

18. Testing your code

Chapter Summary
• How do I create a unit test for existing code?

• How do I add a dependency for a testing framework?

• What should I think about when writing a unit test method?

• How do I run an automated test in IntelliJ IDEA?

• Where do I see the results of a test run?

This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

72
19. Combining testing and debugging

19. Combining testing and debugging

Chapter Summary
• How do I use the debugger to find a problem in my code without running the whole application?

• How do I use the functionality of the debugger to find a code problem?

• How can the debugger help me while I’m writing tests?

This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

73
Getting to Know IntelliJ IDEA (Community Edition)

20. Managing dependencies

Chapter Summary
• What is a dependency?

• Why do I need a tool to manage my dependencies?

• How do I see the dependencies in my project?

• How do I add a new dependency?

20.1. Why do you need dependency management?

20.2. Seeing your project’s dependencies


The Project tool window

The Dependencies tool window

20.3. Adding dependencies


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

74
21. Working with a build tool

21. Working with a build tool

Chapter Summary
• What does a build tool do?

• How do I run build tool commands?

• Where are my configuration files for Maven and Gradle?

21.1. A view of your project’s build tool

21.2. Running the build

21.3. Finding your build configuration


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

75
Getting to Know IntelliJ IDEA (Community Edition)

22. Keeping track of code changes

Chapter Summary
• Why use version control?

• How do I enable Git for version control in my IntelliJ IDEA project?

• How do I double-check what I’m committing to version control?

• How can I see the history of my commits?

22.1. Enabling Version Control (Git)

22.2. Committing changes

22.3. The Git tool window

22.4. Seeing code changes

22.5. What to look for when you’re ready to commit your


code

22.6. Working with remote version control

22.7. Your last line of defence


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part III in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN], or take the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/
developingapplicationswithintellijidea].

76
Part IV: IntelliJ IDEA Essentials
In Part IV we’re pivoting our approach to this book. Whether you’re new to IntelliJ IDEA or are an
experienced user, we recognise there is plenty of functionality in the IDE which you might not have fully
explored.

In this section we are going to examine specific areas of IntelliJ IDEA and how the features support you in
your day-to-day tasks. Throughout this section, we’ll also summarise and cement the knowledge you’ve
learned so far.

To give you context on when and why you would use these IntelliJ IDEA features, we are introducing a new
element to these chapters; a "Frequently Asked Questions" section. These aim to answer your questions as
you dig into these chapters and explore more of what IntelliJ IDEA can do for you. The FAQ section will be
introduced with an "FAQ:" header, and you will see it in many of the upcoming chapters.

If you’ve been using IntelliJ IDEA for a while, you can use this section to learn more about specific parts of
the IDE, such as Run Configurations, using the terminal or what your '.idea' folder contains. The names of
the chapters should help you to pick out what you want to learn more about.

If you’re new to IntelliJ IDEA, we suggest you go through this section in order and see if you can put some
of your learnings into practice and to build on concepts we introduced earlier in this book.

Where to find more


You are reading the community version of this book, thank you for that! This free community version
contains all of Part I of Getting to Know IntelliJ IDEA, but does not include Parts II, III and IV.

If you want to read more, you can:

1. Buy the full version of Getting to Know IntelliJ IDEA. The eBook and PDF versions are available on
Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA], and the paperback version is on Amazon [https://a.co/
d/27KC3YN].

2. Buy the Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea] from
Leanpub. This hands-on course covers everything from Part II of the book.

3. Buy the Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/


developingapplicationswithintellijidea] from Leanpub. This hands-on course covers everything from Part III
of the book.

More information
• PDF and eBook from Leanpub [https://leanpub.com/gettingtoknowIntelliJIDEA]

• Paperback and Kindle book from Amazon [https://a.co/d/27KC3YN]

• Working With Code in IntelliJ IDEA course [https://leanpub.com/c/workingwithcodeinintellijidea]

• Developing Applications with IntelliJ IDEA course [https://leanpub.com/c/developingapplicationswithintellijidea]

77
Getting to Know IntelliJ IDEA (Community Edition)

23. Fixing errors and warnings

Chapter Summary
• Where do the warnings in the editor come from?

• How can I see which errors and warnings are enabled?

• How can I define what IntelliJ IDEA considers an error or a warning?

• Where do I disable a specific error or warning?

23.1. FAQ: Recognising and managing warnings and errors


How do I… see how many problems are in the current file?

How does… IntelliJ IDEA alert me to errors or warnings in my code?

What can I do… when I see an error or warning?

What’s the difference… between an error and a warning?

Where do… these errors and warnings come from?

Can I… change warnings to errors, or errors to warnings?

Why are there… lots of different severity levels?

How can I… tell which Inspection is responsible for a particular error or


warning?

How do I… disable an error or warning?

What should I do… when I see unused code?

How do I… stop IntelliJ IDEA from flagging my framework methods as


unused?
This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

78
24. Refactoring your code

24. Refactoring your code

Chapter Summary
• Why might I want to refactor my code?

• What are the most common refactorings in IntelliJ IDEA?

• How can I move code around within my classes?

• How can I delete code safely inside IntelliJ IDEA?

• How can I reshape my code to find a more readable solution?

24.1. FAQ: Changing your code without breaking it


How do I… rename something in my code without causing compiler errors?

How do I… take some code and put it somewhere else?

How do I… use an expression in-place instead of having it in a separate


method or variable?

How do I… change a method’s signature?

How can I… see which refactoring options are available?

How do I… move blocks of code around?

How can I… delete code safely?

Can… IntelliJ IDEA refactor my code in other ways?

How can I… reshape my code without changing its meaning?

How can I… see a list of all the suggestions?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

79
Getting to Know IntelliJ IDEA (Community Edition)

25. Formatting and arranging your code

Chapter Summary
• Why are standardised code formatting settings helpful?

• How can I get IntelliJ IDEA to apply a standard format to my file?

• Where do I find the code style settings?

• How can I use an .editorconfig file to format my code?

• How can I automatically enforce the arrangement of code in my classes?

25.1. FAQ: When and how to format and arrange your code
How do I… format a file?

How do I… format only part of a file?

Where do I… tell IntelliJ IDEA to only format code that I’ve changed?

How do I… also organise my imports when I format my code?

How do I… get IntelliJ IDEA to automatically fix my code when I format it?

Where do I… define how IntelliJ IDEA should format my code?

Can I… see just the code style settings that affect a particular piece of code?

How do I… share my code style settings with others?

Can I… use EditorConfig files to define my formatting rules?

How do I… get IntelliJ IDEA to format my code before I commit?

How do I… make sure the order of fields and methods is consistent?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

80
26. Benefiting from multiple clipboards

26. Benefiting from multiple clipboards

Chapter Summary
• What is Clipboard History?

• How can I paste something if it wasn’t the last thing I copied?

• How can I search for an item I copied a while back?

• How can I paste several items I’ve copied into the editor at once?

26.1. FAQ: Copying and pasting in IntelliJ IDEA


How can I… paste something if it wasn’t the last thing I copied?

How can I… search for an item I copied a while back?

How can I… paste several items I’ve copied into the editor at once?
This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

81
Getting to Know IntelliJ IDEA (Community Edition)

27. Using Run Configurations effectively

Chapter Summary
• What is a Run Configuration and why do they matter?

• How do Run Configurations get created?

• How can I change settings to customise the way I run my code?

• How can I share the settings for running an application with my team?

• How can I see what command IntelliJ IDEA uses to run my code?

• How do I use the Run Anything shortcut?

27.1. What is a Run Configuration?

27.2. Editing configurations

27.3. FAQ: Running applications and tests


How do I… pass arguments into my application?

How do I… set environment variables?

How do I… set JVM arguments for my application or test?

How do I… share my Run Configurations with my team?

Where does… IntelliJ IDEA look when my application loads an external file?

How do I… see the actual command IntelliJ IDEA is using to run my


application

27.4. Run Anything


How do I… run something without having that file open in the editor?

How do I… run build tool commands?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

82
28. Diving into debugging

28. Diving into debugging

Chapter Summary
• Why are breakpoints important?

• How can I fine-tune my breakpoints so they don’t annoy me?

• How can I see the state of my running program?

• How can I see what’s going on in my Java Stream calls?

• How can I try things out while my program is running?

28.1. FAQ: The importance of breakpoints


What’s the difference… between step into and step over?

Which method… will I step into?

How do I… force the debugger to step into a library method?

When would I… step out of a method?

How do I…. rewind everything this method did and go back to where I was?

How do I… skip some lines and then resume debugging?

How do I… start my program running again?

How can I… see all my project’s breakpoints?

How do I… view and change the properties of a breakpoint?

How do I… clear old breakpoints?

What are… the different types of breakpoints for?

How do I… stop my breakpoints triggering when I don’t want them to?

28.2. FAQ: Seeing program state


What is… IntelliJ IDEA showing me in the editor while I debug?

How do I… see the values of all the variables in scope?

How do I… keep an eye on a specific value or expression?

83
Getting to Know IntelliJ IDEA (Community Edition)

How do I… see the values at each stage of a Stream operation?

How do I… see specific information about an object instead of its toString?

28.3. Debugging a remote application

28.4. Debugging performance problems


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

84
29. Expanding on testing

29. Expanding on testing

Chapter Summary
• How do I find which tests cover which code?

• How do I find the code exercised by a test?

• What is the easiest way to navigate between the test and production code?

• How do I run performance tests in IntelliJ IDEA?

• Can I run tests in parallel in IntelliJ IDEA?

• How do I run groups of tests?

29.1. FAQ: Test coverage


How do I… find untested code?

How can I… run tests with coverage for a single package or test?

How do I… find which tests exercise this piece of code?

29.2. FAQ: Getting comfortable with automated tests


How do I… stay in the flow while writing tests?

How do I… know if my class has a test?

How do I…. run a test without needing to open it in the editor first?

How do I… run a group of tests?

How do I… run tests in parallel instead of sequentially?

When should I… run my tests with Gradle instead of IntelliJ IDEA or vice-
versa?

Can I…. run performance tests in IntelliJ IDEA


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

85
Getting to Know IntelliJ IDEA (Community Edition)

30. Building on build tools

Chapter Summary
• Why do I need to use a build tool for my projects?

• How do I build and run with a build tool in IntelliJ IDEA?

• Where should I look to debug problems with running the build?

• How can I configure my build tool in IntelliJ IDEA?

30.1. The Maven or Gradle tool window

30.2. FAQ: Maven, Gradle and IntelliJ IDEA


How do I… call specific tasks or phases?

Where do I see… my build output?

How do I… get IntelliJ IDEA to automatically reload build file changes?

How do I… use IntelliJ IDEA’s test runner instead of Gradle?

What if… I’m getting unexpected behaviour?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

86
31. Doing more with dependencies

31. Doing more with dependencies

Chapter Summary
• How do I see my dependencies?

• Why would I choose one dependency view over another?

• What are the different approaches to adding a dependency?

• How can I update my dependencies?

• How does the Dependencies tool window help me?

31.1. Dependencies tool window

31.2. FAQ: Working with dependencies


Where do I see… my project’s dependencies?

How do I… add a new dependency?

How do I… update one or more dependencies?

Do I need… a dependency management tool?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

87
Getting to Know IntelliJ IDEA (Community Edition)

32. Making version control work for you

Chapter Summary
• Why work with version control?

• What are the advantages of using version control?

• How do I use Git inside IntelliJ IDEA?

• How can I use version control to experiment safely?

• What’s the difference between merging and rebasing in Git?

• How do I resolve merge conflicts in IntelliJ IDEA?

• How can IntelliJ IDEA make working with Git easier?

32.1. Why work with a Version Control System (VCS)

32.2. The Commit tool window

32.3. FAQ: Committing changes


How can I… see the changes I’ve made to my files?

How do I… commit just part of my changes?

How do I… reuse a commit message from some time in the past?

How can I… get IntelliJ IDEA to automatically check code before commit?

When would I… use Commit versus Commit and Push?

How do I… push to a different branch or remote?

What are… changelists, and what are they for?

32.4. The Git tool window


Branches

Commits

Commit details

88
32. Making version control work for you

32.5. FAQ: Working with branches


How do I… create a new branch?

How do I… merge my branch?

How do I… rebase my branch?

What’s the difference… between merge and rebase?

How do I… delete my branch?

How can… IntelliJ IDEA help me with merge conflicts?

How do I… stop this merge and go back to a known good state?

How do I… copy a commit from one branch into my current branch?

32.6. FAQ: Git for more experienced users


How do I… change the description of a commit?

How do I… force a push to a remote?

How do I… re-write my Git history?

Can I… just use the Git command line?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

89
Getting to Know IntelliJ IDEA (Community Edition)

33. Viewing and applying local history

Chapter Summary
• What is Local History?

• How do I revert my file to a copy from my Local History?

• How do I revert part of my file from fragments in Local History?

• What do the labels mean in the Local History list?

• How can I use Local History to see files that have been deleted?

33.1. FAQ: Using Local History to get back to a known


working state
How do I… revert my file to a copy from my Local History?

How do I… revert part of my file from fragments in Local History?

What do… the labels mean in the Local History list?

How can I… use Local History to see files that have been deleted?
This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

90
34. Running commands in the terminal

34. Running commands in the terminal

Chapter Summary
• How can I run commands inside IntelliJ IDEA?

• What can I do with the IntelliJ IDEA terminal?

• What’s the difference between running a command in the terminal and running it in the IDE?

34.1. FAQ: Working with the built-in terminal


How do I… open the terminal at a specific location?

How do… links work in the terminal?

How do I… run terminal commands in IntelliJ IDEA?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

91
Getting to Know IntelliJ IDEA (Community Edition)

35. Managing work TODO

Chapter Summary
• Where can I see all the todo-style comments in your project code?

• How can I tell IntelliJ IDEA about a different type of todo comment?

• How can I configure the Commit tool window to either check or ignore new todo comments?

35.1. FAQ: Viewing and managing your project’s TODOs


How do I… get the TODO tool window to show different types of comments?

How do I… get IntelliJ IDEA to commit my changes even if there are TODO
comments in the code?
This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

92
36. Pairing with code with me

36. Pairing with code with me

Chapter Summary
• How can I securely collaborate with one or more people simultaneously in IntelliJ IDEA?

• How can I work with someone remotely, even if they don’t have IntelliJ IDEA installed?

36.1. Using Code With Me


Starting a session

Voice and video calls

Screen-sharing

36.2. FAQ: Tips for Code With Me


How do I… get people to watch what I’m doing?

How do I… watch what someone else is doing?

How do I… make sure everyone’s changes are checked in?

What are… the restrictions of the thin client?

What else… can I use Code With Me for?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

93
Getting to Know IntelliJ IDEA (Community Edition)

37. Working with plugins

Chapter Summary
• What are plugins in IntelliJ IDEA?

• How can I search for and enable plugins?

• Why would I want to disable a plugin?

37.1. FAQ: How to view and change the plugins you work
with
How do I… view which plugins are installed?

How do I… add a new plugin?

How do I… disable or uninstall a plugin?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

94
38. Using AI Assistant

38. Using AI Assistant

Chapter Summary
• What is AI Assistant?

• How can AI Assistant help me?

• When should I not use AI?

This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

95
Getting to Know IntelliJ IDEA (Community Edition)

39. Understanding Java in IntelliJ IDEA

Chapter Summary
• Is it true that IntelliJ IDEA itself runs on Java?

• Is IntelliJ IDEA using the same version of Java as the code that I’m running?

• How can I configure the JVM that IntelliJ IDEA uses for itself?

• Does changing IntelliJ IDEA’s JVM settings affect the version of Java I’m using to compile and run
my code?

• What is the JetBrains Runtime?

• How can I tell the difference between JVM errors caused by IntelliJ IDEA and JVM errors caused
by my code?

39.1. FAQ: IntelliJ IDEA’s Java settings


How can I… change the JDK IntelliJ IDEA runs on?

Where do I… see the JVM settings for my project?

39.2. FAQ: Troubleshooting JVM errors


What JVM errors… might my IDE have?

What JVM errors… might my application have?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

96
40. Deciphering the Project Structure dialog

40. Deciphering the Project Structure dialog

Chapter Summary
• What is the Project structure dialog and how can I open it?

• How do I change which version of Java my project uses?

• How can I manage my project’s modules?

• What are "facets", and why do they matter?

• Where would I go to get IntelliJ IDEA to build artifacts for my project?

40.1. FAQ: JVM and Java Settings


How do I… change the version of Java for my project?

How do I… download a different JDK for my project?

How do I… manage the list of JDKs in IntelliJ IDEA?

How do I… change where my compiled code goes?

40.2. FAQ: Project Structure


Where can I… change the name of my project?

How do I… see my project’s modules and configure them?

How do I… see what libraries my project is depending on?

What is… an IntelliJ IDEA Facet?

How do I… create an artifact for my project?

How can I… share my Project Structure settings?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

97
Getting to Know IntelliJ IDEA (Community Edition)

41. Looking in your .idea folder

Chapter Summary
• What’s the .idea folder for?

• What files are stored in my .idea folder?

• Should I commit my .idea folder to version control?

41.1. FAQ: Understanding what’s in your .idea folder


What are… the files in the .idea folder?

Should I… put the files in the .idea folder into Git?

How do I… reset my project settings?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

98
42. Changing IntelliJ IDEA settings

42. Changing IntelliJ IDEA settings

Chapter Summary
• How can I quickly change a setting?

• Where can I find and view settings?

• How can I revert to the default settings?

42.1. FAQ: Tinkering with your project settings


How do I… quickly find and change any setting in IntelliJ IDEA?

How do I…. find a setting in the Settings dialog?

How do I… browse the Settings dialog?

How do I… revert my settings to a known good state?


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

99
Getting to Know IntelliJ IDEA (Community Edition)

43. What to do if things go wrong

Chapter Summary
• Something’s gone wrong; what can I try?

43.1. Where to look in the IDE

43.2. Writing and running

43.3. Problems with your project

43.4. Problems with the IDE

43.5. Problems caused by plugins

43.6. What to check and change


This free community version does not include the contents of Parts II, III and IV of Getting to Know IntelliJ
IDEA. Read Part IV in PDF and eBook [https://leanpub.com/gettingtoknowIntelliJIDEA] or Paperback and Kindle
[https://a.co/d/27KC3YN].

100
Appendix A: Top Tips that did not make it into the book

Appendix A: Top Tips that did not make it into


the book
A.1. Multiple carets

A.2. Multi-line Strings

A.3. Find in Files

A.4. Shortcut on dialogs

A.5. Searchable dialogs and tool windows

101
Getting to Know IntelliJ IDEA (Community Edition)

Appendix B: Top Keyboard Shortcuts

102

You might also like