
Meet your instructor, a seasoned full-stack engineer, and discover how IntelliJ is the tool of choice for developing and configuring applications, with new features and tricks to explore.
Explore the IntelliJ IDEA 2021 interface, including navigation bar, project tool window, editor, and status bar, and learn to install plugins from settings and marketplace such as Lombok and PlantUML.
If you would like to create a personal cheat sheet of things to memorize, consider creating a new scratch file (see lecture in the Misc section) to note down the things and shortcuts that you intend to start using.
You can download, unzip and open the "coding-java" folder in IntelliJ if you want to code along with me. It contains sample code for this course.
The online-course-app is a sample application used in the Spring Integration section of this course.
Create packages and classes in IntelliJ IDEA 2021 for Java and Kotlin, using ALT+INSERT to generate constructors, equals and hashCode, and getters or setters for price, rooms, floors, and address.
Discover how IntelliJ highlights issues, apply quick fixes with Alt+Enter, navigate with F2, replace lambdas with method references, and use the diamond operator to finalize the constructor range.
Learn to comment code in Java, XML, and YAML with line and block comments, using keyboard shortcuts to comment and uncomment across multiple lines.
Learn general editing shortcuts in IntelliJ IDEA 2021 for Java and Kotlin, such as deleting or duplicating lines, extending selections with ctrl+w, multi-cursor edits, and joining lines with ctrl+shift+j.
Master essential editing shortcuts in IntelliJ IDEA to edit text and code efficiently, including F2 for errors, Alt Enter for fixes, and multi-cursor with Alt+Shift.
Shortcuts covered in this lecture:
reformat code
optimize imports
join lines
Note 1: you can also export your customized code formatting settings to share it with other team members from the settings dialog.
To make sure other developers (with other IDEs) adhere to the same code formatting rules, consider using a ".editorconfig" file. This is described in a separate lecture in the bonus section.
Note 2: In the settings, you can enable auto-formatting and import optimization as a default action to be performed on save. The version control commit dialog also has checkboxes to run these actions before committing.
Discover multiple auto completion mechanisms in A.J., including control-space and control-shift-space, with intelligent filtering by type to complete statements, if blocks, and customizable code completion settings.
Learn how to override superclass methods in Java using IntelliJ shortcuts and postfix completion to generate statements, including a format call to display room and floor counts.
Explore how to speed up Java development in IntelliJ IDEA with live templates and postfix completion. Create custom templates with placeholders and context to reuse code patterns and automate imports.
Explore simple refactorings to improve clarity and maintainability by renaming a method that greets and its value parameter, extracting a constant for the hello string, and inlining the parameter.
Discover advanced rename refactoring options in IntelliJ IDEA, using shortcuts to include or limit scope, search for text occurrences in code, comments, and strings, and selectively update documentation.
Refactor safely by introducing a string to string hash map for replacements and iterating the map to apply changes, with tests ensuring behavior stays consistent.
Explore type migrations and constructor signature changes by converting a price field from a wrapper to a primitive double, previewing impacted locations, and cleaning up the pay method.
Explore refactoring a pizza class by replacing a bloated constructor with a factory method to create a margarita pizza, and consider a builder pattern for selecting ingredients.
Explore refactoring inside UML diagrams in IntelliJ IDEA, using right-click or control-shift shortcuts to open diagrams, view methods, and add new methods to a Java class.
Refactor a pizza class by replacing the constructor with a builder and introducing a public static builder class to create pizzas via a factory method with toppings.
apply the extract parameter object refactoring to simplify a method signature by creating a point class with X and Y, and replacing parameters with the new object.
Explore replacing if statements with the strategy pattern to calculate entrance fees using adult and child strategies for full and half-day tickets, via a clear fee strategy interface.
Learn to create and run JUnit 5 tests in IntelliJ IDEA 2021 for Java and Kotlin developers, navigate to test classes and methods, and apply JUnit 5 annotations with shortcuts.
Note for color-blind users: To modify the line coverage colors, go to 'File | Settings | Editor | Color Scheme | General' and choose "Line coverage" from the tree of options.
JaCoCo is often used to calculate test coverage metrics on CI/CD systems - having the same percentages in IntelliJ and on a build server is a good idea. This lecture shows you how to change the setting in IntelliJ.
Tip: To better memorize shortcuts for various tool windows, display the tool window numbers in the IDE.
Assign custom tool window shortcuts in IntelliJ IDEA 2021 for Java and Kotlin developers by using the actions dialog (Ctrl+Shift+A), selecting configure shortcuts, and setting a MAVEN shortcut in Settings.
Search inside an open file via the toolbar and highlight matches. Navigate between results with arrow keys, refine with match case or word matching, and replace all occurrences with ctrl+shift+alt+g.
Learn basic replacement in files using the replace dialog in IntelliJ IDEA, choosing instance-by-instance or all, toggling case matching, and using the preserve case option to keep uppercase where appropriate.
Open the find dialog with ctrl+shift+f to search the entire project or a custom scope, preview results, refine with file mask filters, and review matches in the find window.
Replace strings across an entire project in IntelliJ IDEA 2021 using a custom scope, filtering to Java files, previewing matches, and applying replacements with keyboard shortcuts.
Explore using regular expressions for search and replace in a comma-separated file, matching a date with capture groups and reformatting it to a dash-delimited pattern via replacements.
Explore structural search and replace in IntelliJ IDEA 2021 to unify builder usage, switching between constructor calls and the static Builder method.
Explore viewing type and method hierarchies in IntelliJ IDEA 2021 for Java and Kotlin developers. Navigate between superclasses, subclasses, and method implementations using hierarchy shortcuts and the actions dialog.
Navigate large IntelliJ IDEA projects by using shortcuts to find files, classes, and symbols across modules and packages. Explore go-to-class and search-everywhere features, plus typing highlights and package views.
Access recently opened files with the recent files shortcut, scroll, or type to trim results. Use control shift plus you to view more context in the structure and module windows.
Create and edit bookmarks in your files with F11 or right-click, and use mnemonic bookmarks with Ctrl+F11. View bookmarks in the Favorites window or with Shift+F11 to navigate to locations.
Open the favorites window, create a new list like code samples, and add files or packages to organize key Java files. Access favorites via shortcuts or the Find Action dialog.
Use F2 to jump to the next error, Ctrl+F12 to view the file structure and select methods, and Ctrl+Shift+Backspace to return to the last edit.
Navigate to declarations and usages across code in IntelliJ IDEA using control-click to jump to constructors, methods, or fields. Use keyboard shortcuts to list and jump to specific usages.
Use control-click on files or tabs to open them in an associated external program like Nautilus, or right-click to open in a system browser or terminal.
Install node and npm, manage node versions with a version manager, and bootstrap an Angular CLI project in IntelliJ IDEA to explore npm scripts, dependencies, and npm integration.
Learn to manage angular dependencies via npm by editing package.json, selecting versions (latest or lts), and installing with npm install; remove dependencies by editing package.json and re-running npm install.
Open the project window and press Ultan Insert to insert new angular dependencies or angular schematics to generate, for example, a new cloth inside our app folder.
Visualize JavaScript module dependencies with diagrams to see the dependency cluster in an Angular project and gauge complexity; avoid running it inside a JavaScript project if you want that view.
Create a new maven project in IntelliJ by selecting maven, optionally using the archetype quickstart, naming the project, and finishing to view the default maven structure and spring support.
Explore the maven tool window in a spring boot project, view dependencies and plugins, reload maven projects, and run lifecycles to manage dependencies, sources, and generated resources.
Access maven settings quickly in the Maven settings dialog in IntelliJ, adjust output level, thread count, and maven version (bundled or wrapper), and configure a custom settings XML for proxies.
Use the Maven tool window to view the effective POM and generate a dependencies diagram, identifying transitive dependencies and classpath conflicts, then apply exclusions to prevent loaded dependencies.
Insert dependencies in project and search for artifacts such as the Kafka client. Use the dependencies tool window to upgrade Maven Gradle versions, convert numbers to properties, and adjust scopes.
Learn to create and manage multi-module Maven projects in IntelliJ IDEA 2021, including adding core and demo modules, setting a parent, and building modules or the whole project.
Manage maven installations, use the maven wrapper, and align the correct maven version with the appropriate JDK for reliable Java and Kotlin builds in IntelliJ IDEA.
Create a new Gradle project in IntelliJ, use the Gradle wrapper and tool window to run tasks, manage dependencies, and apply updates.
Clone a Java and Kotlin project from GitHub by configuring git, using IntelliJ's version control integration, and waiting for Gradle to download dependencies and initialize.
Explore the git tool windows and toolbars in IntelliJ IDEA 2021, including the top toolbar, update/pull actions, commit dialog, history view, rollback changes, and keyboard shortcuts for quick git operations.
Learn to use git in the IntelliJ terminal, manage multiple terminals, view conflicts, and understand when IDE updates may lag after pulls or branch changes.
Open the git tool window in IntelliJ IDEA to view local and remote branches and commit history with diffs; filter by user, date, or path.
Navigate git history and blame in IntelliJ by annotating a file to view last commits per line, opening file or folder histories, and managing multiple history taps.
Switch to a new branch in IntelliJ to develop a web API endpoint, use git checkout to switch, create a local branch, and mark favorites to keep them on top.
You may skip this lecture if you are not interested in the ktor framework.
In this coding exercise, we add a new web endpoint to our ktor project which returns the current time, so that we have some local changes for committing and pushing.
Learn how to commit the new feature using the IntelliJ commit tool window, review diffs before committing, and push commits to a remote branch.
Master managing multiple remote repositories in IntelliJ IDEA 2021 by adding a new remote, pushing commits to a fork on GitHub, and choosing between origin and fork.
Learn how to fetch from a Git remote, and pull from a specific remote in IntelliJ IDEA, using merge or rebase to apply incoming changes on your current branch.
Resolve git conflicts in IntelliJ IDEA by merging diverging branches, viewing conflicts, and applying left or right changes to reconcile routing and time-related names.
Customize the version control color scheme to distinguish changed lines, including blue and green indicators, with options for color blindness and custom colors in the editor settings.
Explore IntelliJ local history for file changes, rollback, and labeling to mark refactoring points. Learn to view, compare, and restore states using show history, labels, and timestamps.
Open local history from the file tree by right-clicking a file or folder to view diffs and recent changes, and quickly revert or restore previous versions.
Explore shelf and stash workflows in IntelliJ: switch branches with local changes, resolve conflicts, and manage multiple change lists by shelving, unshelving, and applying changes later.
Stash changes directly from IntelliJ IDEA using the git menu to uncommitted changes, add an optional message, then review stash entries and apply a selected stash.
Customize pre-commit checks by enabling code reformatting, import optimization, and test runs; choose analyzer profiles and filter checks, enabling a lightweight Scotland profile before committing.
Learn to compare file contents across git versions, branches, and clipboard data, using diff views for single files or entire folders.
Explore how to amend commits, edit messages, and rewrite history with interactive rebase in IntelliJ, including squashing commits, rewording, and undoing unintended commits before opening a pull request.
Explore git submodules to manage multiple projects with linked repositories, like a JavaScript library used across apps. Learn cloning, updating, and syncing submodules, resolving detached head state, and version bumps.
Explore IntelliJ IDEA's gitignore support, learn how to ignore secret files and folders, and use the right-click menu to add a gitignore entry so they aren't committed.
Learn how to enable and configure issue navigation in IntelliJ to link Jira or YouTrack issues directly from comments and commits, preview links, and open them in your browser instantly.
Integrate issue trackers with IntelliJ using Jira server, filters, and remote configuration. Access tasks from the task toolbar and perform actions like update issue state, create branches, or shelve changes.
Enable time tracking in project settings to monitor time spent on tasks, use the time tracking tool window, and auto or manual log entries to the issue tracker.
Set breakpoints in the gutter and start debug mode in IntelliJ IDEA 2021, using Shift+F9 and F9 to step through code, inspect frames and variables, and monitor console output.
Master step into and step over to trace method execution in a Java program, using breakpoints and resume to inspect a swap method, fix a minus-plus error, and verify output.
Explore method breakpoints, normal line breakpoints, exception breakpoints, and field watch points in IntelliJ IDEA, and learn to suspend via their breakpoints view and the control-shift-eight shortcut.
Learn to set a conditional breakpoint inside the swap method in IntelliJ IDEA, so the debugger suspends only when a condition is met, and disable it to resume normal iteration.
Discover non suspending log breakpoints in IntelliJ IDEA 2021 to inspect variables without pausing. Hold shift and click the gutter to enable it, then evaluate values and use filters.
Use passcode breakpoints in loops to suspend after four hits, skip initial iterations, and log the hidden breakpoint message; access advanced settings with ctrl+shift+f8 to modify behavior.
Evaluate expressions at breakpoints, add watches, and change variable values to enter the desired if branch during debugging in IntelliJ IDEA.
Explore debugging Java streams with the Java stream debugger plugin in IntelliJ IDEA 2021 for Java and Kotlin developers. Trace, map, and filter streams, view size changes, and collect results.
In this exemplary debugging session, we analyze a typical issue with concurrent access on seemingly thread safe code. Breakpoint settings can be modified to suspend the current thread only instead of everything. This is often needed in such scenarios.
Learn to alter execution flow and return values in a Java debugging session with IntelliJ IDEA 2021, using breakpoints, simulate exceptions, and force custom returns.
Go to https://www.jetbrains.com/help/idea/pro-tips.html#dcevm for more information on how DCEVM can overcome some reloading limitation sin debugging sessions (mentioned at the end of the lecture).
Learn to display and analyze stack traces from external sources in IntelliJ by pasting the trace, using the analyze stack trace tool, selecting project classes, and navigating to source.
Use the analyze data flow feature in IntelliJ to trace a field's value origin, revealing it is set only in the constructor and connected to the booking class.
I invite you to join my IntelliJ IDEA course, which will not only cover many keyboard shortcuts but also other productivity boosters like strategies for debugging and refactoring - all condensed into a single well structured course.
This course is intended for all software engineers and developers who would like to unlock the full potential of their IDE.
I am using the Ultimate edition of IntelliJ in this course- if you do not have a license then you can either use the 30 day trial version of intelliJ or simply skip the (few) parts which are not applicable to the community edition.
This is a hands-on course - meaning lectures are mostly screencasts with additional explanations. Sample code is provided as a downloadable zip archive so that you can code along with me - this will help you a lot to actually memorize the shortcuts and contents of the course.
The lectures are kept short, so that you can watch them anytime (e.g. during your coffee breaks) and so that you can skip the parts that you already know and re-watch what you forgot.
The course will be updated from time to time when new IDE releases introduce meaningful changes or features.
Feel free to take a look at the free preview videos before enrolling.