cotalks.dev

Be more productive with IntelliJ IDEA - Marit van Dijk

(link)
Channel: Devoxx

Summary

Marit van Dijk demonstrates a wide range of IntelliJ IDEA features aimed at improving day-to-day developer productivity. The talk focuses on finding and using capabilities already built into the IDE: navigation shortcuts, search, live templates, code completion, refactorings, debugger tooling, language injection, inspections, and Git workflows. Rather than teaching shortcuts in isolation, the session shows how to use IntelliJ to reduce context switching and keep common workflows inside the editor. The demo uses a small Java example to show how IntelliJ helps while editing, compiling, running, and refining code. It also highlights newer features such as command completion, plus practical IDE customization like themes, zoom, presentation assistant, and plugins. The second half covers advanced tools such as debugger stream tracing, custom live templates, structural search/replace, database-aware SQL editing, and interactive rebase from inside the IDE.

Key Takeaways

  • IntelliJ IDEA can keep common developer workflows inside the IDE, reducing context switching to browsers, terminals, and external tools.
  • Search Everywhere, recent files, bookmarks, and hidden tool window shortcuts make navigation much faster than manual browsing.
  • Live templates, postfix completion, command completion, and type matching completion speed up editing and reduce typing.
  • Quick fixes, inspections, and refactorings help move code toward newer Java patterns such as try-with-resources, streams, and method references.
  • The debugger can visualize stream chains and support non-suspending logging breakpoints, conditions, and drag-and-drop breakpoint placement.
  • Language injection enables IDE assistance for embedded SQL, regex, JSON, and other snippets, including completion and validation.
  • Structural search and replace can be turned into custom inspections and quick fixes for repeated code patterns across a codebase.
  • Git interactive rebase is available in the IDE, making commit cleanup and history rewriting easier than command-line workflows.

Sections

IDE setup and customization

The talk begins by framing IntelliJ IDEA as a tool that already integrates with common developer needs: Spring Boot project creation, VCS, databases, Maven, and Gradle. Marit also shows practical IDE customization, including themes, zooming, presentation assistant, and plugins. These features are presented as ways to work comfortably without leaving the editor.

Navigation and search

A large portion of the productivity gains come from navigation. The demo covers Search Everywhere, searching by classes/files/symbols/actions, recent files, recent locations, hidden tool windows, and bookmarks with mnemonics. The message is that faster navigation matters as much as code generation because it keeps the developer in flow.

Completion and live templates

The code demo shows Java live templates such as `psvm` and `main`, camel-case completion like `BR` for `BufferedReader`, and API completion on methods. Marit also introduces command completion, a newer feature that exposes IDE actions directly from completion without memorizing shortcuts. Postfix completion, type matching completion, and custom live templates are shown as ways to write less boilerplate.

Refactoring and code cleanup

Using a small file-reading example, the talk shows how IntelliJ helps fix compilation errors with quick fixes, then improves the code with extract variable, extract method, inline, join lines, change signature, and optimize imports. The demo also shows stream-based refactoring, try-with-resources, method references, and the difference between Enter and Tab when completing code.

Debugger features

The debugger section shows standard breakpoints, inline variable state, conditional breakpoints, evaluate-and-log breakpoints, and moving breakpoints by drag and drop. A highlight is stream chain tracing, which visualizes each step in a Java stream pipeline and helps explain how filters and transformations affect the data.

Language injection and embedded languages

Marit demonstrates language injection for regex and SQL. With regex injection, IntelliJ can validate patterns and explain what they mean. With SQL injection, database-backed completion works inside string literals, which is especially useful for PostgreSQL queries and other embedded languages. The same idea applies to JSON and HTML fragments.

Inspections, structural search, and custom quick fixes

The talk closes with structural search and replace, showing how repeated code patterns can be turned into inspections and quick fixes. This is demonstrated with an `orElse(null)` plus null-check pattern that can be replaced with `orElseThrow`. The point is that teams can encode their own best practices into IntelliJ rather than relying on manual reviews alone.

Git workflow and interactive rebase

Finally, Marit shows interactive rebase from inside IntelliJ IDEA. The IDE can reorder commits, squash or fix up history, and help clean up work before pushing. This is presented as a safer, more visual alternative to doing the same task in a terminal editor.

Keywords: intellij idea productivity, intellij idea shortcuts, search everywhere, recent files navigation, bookmarks in intellij idea, live templates java, postfix completion, command completion intellij, code completion java, quick fix alt enter, refactoring in intellij idea, extract method refactor, try-with-resources refactor, java stream debugging, debugger stream chain tracing, conditional breakpoints, evaluate and log breakpoint, language injection sql, regex validation in intellij idea, database tooling in intellij idea, structural search and replace, custom inspections intellij, git interactive rebase intellij, spring boot project creation, maven gradle integration

note