Marit van Dijk, Author at foojay https://foojay.io/today/author/marit-van-dijk/ a place for friends of OpenJDK Fri, 06 Mar 2026 10:33:34 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://foojay.io/wp-content/uploads/2020/04/Favicon-3-2-150x150.png Marit van Dijk, Author at foojay https://foojay.io/today/author/marit-van-dijk/ 32 32 Foojay Podcast #91: 25 Years of IntelliJ IDEA: The IDE That Grew Up With Java https://foojay.io/today/foojay-podcast-91/ https://foojay.io/today/foojay-podcast-91/#respond Mon, 02 Mar 2026 07:21:06 +0000 https://foojay.io/?p=122832 Table of Contents YouTubePodcast AppsGuestsLinksContent In this Foojay Podcast, we're celebrating a major milestone in Java development history: 25 years of IntelliJ IDEA. Think about it: IntelliJ IDEA launched in 2000, and since then, it has become the go-to IDE ...

The post Foojay Podcast #91: 25 Years of IntelliJ IDEA: The IDE That Grew Up With Java appeared first on foojay.

]]>
Table of Contents
YouTubePodcast AppsGuestsLinksContent

In this Foojay Podcast, we're celebrating a major milestone in Java development history: 25 years of IntelliJ IDEA.

Think about it: IntelliJ IDEA launched in 2000, and since then, it has become the go-to IDE for millions of Java developers worldwide. From its revolutionary code completion and refactoring tools to AI-powered features and the recent unified Community and Ultimate release, IntelliJ has shaped how we write Java, and keeps reinventing itself to stay ahead.

For this episode, I'm joined by three people from the JetBrains team who know this story inside and out. Marit van Dijk, developer advocate and contributor to the Foojay community. Anton Arhipov, also a developer advocate at JetBrains. And Dmitry Jemerov, who has been part of the IntelliJ IDEA story for a very long time.

YouTube

Podcast Apps

You can listen and subscribe to the Foojay Podcast on:

Guests

Links

Content

00:00 Introduction of topic and guests
01:36 Now JetBrains started
02:31 Licensed software in an open-source world
06:37 Other JetBrains IDEs
07:46 Why Kotlin was created
08:50 The challenge of maintaining all the tools
10:36 How the guests joined JetBrains
14:03 IntelliJ versus IntelliJ IDEA, history of the name
15:10 Most important ongoing changes in IDEs
17:55 Unified distribution of IntelliJ IDEA and the history of the open-source version
21:28 The number of people at JetBrains
23:31 the "business model" behind Kotlin
24:39 The impact of AI, LLM, Chat interfaces,...
35:49 Upcoming evolutions in IntelliJ IDEA
38:07 About shortcuts and the many features and plugins in IntelliJ IDEA
46:36 Announcements: IntelliJ IDEA Conf 2026 and Documentary Trailer
48:35 The IntelliJ IDEA Birthday Game
49:24 Conclusions

The post Foojay Podcast #91: 25 Years of IntelliJ IDEA: The IDE That Grew Up With Java appeared first on foojay.

]]>
https://foojay.io/today/foojay-podcast-91/feed/ 0
You’re invited to IntelliJ IDEA Conf 2026! https://foojay.io/today/youre-invited-to-intellij-idea-conf-2026/ https://foojay.io/today/youre-invited-to-intellij-idea-conf-2026/#respond Wed, 11 Feb 2026 11:35:08 +0000 https://foojay.io/?p=122654 Table of Contents Day 1Day 2RegisterJoin live sessions and ask questionsRecordingsHashtags Important update: IntelliJ IDEA Conf 2026 is now scheduled for September 2026. We’re finalizing the exact dates and will share them  soon. IntelliJ IDEA Conf is a celebration of ...

The post You’re invited to IntelliJ IDEA Conf 2026! appeared first on foojay.

]]>

Table of Contents
Day 1Day 2RegisterJoin live sessions and ask questionsRecordingsHashtags


Important update: IntelliJ IDEA Conf 2026 is now scheduled for September 2026. We’re finalizing the exact dates and will share them  soon.

IntelliJ IDEA Conf is a celebration of the developer community, bringing together professionals who strive for excellence in software development. It is a free online conference for developers working across the JVM ecosystem. Join us for two days of in-depth technical talks, practical insights, and conversations with experts who build and shape modern Java and Kotlin development.

You’ll be able to learn about a broad range of topics relevant to modern Java and Kotlin development, including language evolution, enterprise Java, Spring-based applications, build tooling, containerized workflows, JVM performance, and data access technologies. For more details, see the agenda below.

Agenda

Important update: IntelliJ IDEA Conf 2026 is now scheduled for September 2026.

The conference has a single track on both days.

Find the detailed conference schedule, session descriptions, and speaker bios on the conference website.

Day 1

09:00 am – 10:00 am UTC – Now and Next Java for AI by Ana-Maria Mihalceanu
10:00 am – 11:00 am UTC – Spec-Driven Development With AI Agents: From High-Level Requirements to Working Software by Anton Arhipov
11:00 am – 12:00 pm UTC – From Chat to Goals: Practical Autonomous Agents for Java Development by Mark Pollack
12:00 pm – 01:00 pm UTC – Accelerating Maven Builds: From a Snail’s Pace 🐌 to Rocket Speed 🚀 by Maarten Mulders
01:00 pm – 02:00 pm UTC – Safeguarding YOLO Developer Workflows With Docker by Oleg Šelajev
02:00 pm – 03:00 pm UTC – Polyglot GraalVM by Thomas Wuerthinger

Day 2

09:00 am – 10:00 am UTC – From Code to Community: How Developers Shape the Tools They Use, panel session with Anna-Chiara Bellini, Mithusa Kajendran, Ruth Suehle, Vincent Mayers, hosted by Arun Gupta
10:00 am – 11:00 am UTC – The Past, Present, and Future of Enterprise Java by Ivar Grimstad
11:00 am – 12:00 pm UTC – Exploring Data Science With Kotlin Notebook by Adele Carpenter
12:00 pm – 01:00 pm UTC – Using IntelliJ IDEA With Develocity and AI for Faster Troubleshooting by Stefan Wolf
01:00 pm – 02:00 pm UTC – The Missing Protocol: How MCP Bridges LLMs and Data Streams by Viktor Gamov
02:00 pm – 03:00 pm UTC – Bootiful IntelliJ IDEA by Josh Long

Attending sessions – logistics

Find the details on how to join sessions below.

Register

The first step is to register for the event!

Registration is free and open to everyone. When you sign up, you can choose whether you want to attend all sessions or focus only on the ones most relevant to you. You’ll receive the final dates, agenda, and details for joining the online event as soon as they’re confirmed.

Join live sessions and ask questions

Sessions are livestreamed directly from the JetBrains studios, and speakers will answer your questions either during or at the end of their sessions. We encourage you to ask any questions you might have via the chat option while watching the sessions. Engaging with the speaker and fellow participants is one of the best ways to learn.

Recordings

All of the sessions will be recorded and made available for you to watch again or catch up on after the event. Don’t forget to subscribe to IntelliJ IDEA’s YouTube channel to view them.

Hashtags

Don’t miss the chance to connect with us on social media! Use the hashtag #IntelliJIDEAConf on X (formerly Twitter), Bluesky, LinkedIn, and Facebook throughout the event.

A special thanks to our speakers

This conference wouldn’t be possible without the fantastic speakers and presenters who all strive to assist developers throughout their learning journey. At JetBrains, we are very thankful for all the speakers who graciously accepted our invitation to participate in this event.

We reserve special thanks for industry experts and leaders like Ana-Maria Mihalceanu, Anton Arhipov, Mark Pollack, Maarten Mulders, Oleg Šelajev, Thomas Wuerthinger, Anna-Chiara Bellini, Mithusa Kajendran, Ruth Suehle, Vincent Mayers, Ivar Grimstad, Adele Carpenter, Stefan Wolf, Viktor Gamov, and Josh Long who have agreed to join us for this event. We truly appreciate their support!

Register now!

See you at the conference!

The post You’re invited to IntelliJ IDEA Conf 2026! appeared first on foojay.

]]>
https://foojay.io/today/youre-invited-to-intellij-idea-conf-2026/feed/ 0
Command completion: IntelliJ IDEA with less shortcuts https://foojay.io/today/command-completion-intellij-idea/ https://foojay.io/today/command-completion-intellij-idea/#respond Tue, 20 Jan 2026 07:31:35 +0000 https://foojay.io/?p=122398 Table of Contents Command completion extends regular completionFix errors and warnings with command completionPerform file- or class-level actionsRefactoring and code transformationUse command completion for navigationAliases for several commandsComplements existing featuresConclusion How many shortcuts can you remember? Three? Five? More? I ...

The post Command completion: IntelliJ IDEA with less shortcuts appeared first on foojay.

]]>
Table of Contents
Command completion extends regular completionFix errors and warnings with command completionPerform file- or class-level actionsRefactoring and code transformationUse command completion for navigationAliases for several commandsComplements existing featuresConclusion

How many shortcuts can you remember? Three? Five? More? I try to learn as many as I can and still forget some of them…

What if you could unlock IntelliJ IDEA features, without having to remember shortcuts? You can still use shortcuts if you want. But you don’t have to.

Command completion (..) is a new feature in IntelliJ IDEA that lets you discover and execute IDE actions right from your editor. 

Command completion extends regular completion

Command completion is an extension of regular code completion - something every developer already uses. For example, when you have a variable, you can type a dot to show you completion options. It will show you API completion (all of the methods you can call on this variable), and postfix completion (templates you can apply to this variable). The list now also includes commands; all relevant commands for your current context. Code completion (a single dot) is now a universal entry point for all relevant actions.

To filter the list to show commands only, type two dots ... As the list can be quite long, the list is searchable, so you can type part of the command you want to use. 

Command completion extends regular completion

By default, the commands are shown in a separate section of the list. If you prefer Commands to be part of the regular completion list, you can adjust this in the Settings. Use Search Everywhere (Shift Shift) and look for “command completion” to go straight to the relevant settings and uncheck the option Show command completion as a separate group.

Command Completion Settings: Show command completion as a separate group

Fix errors and warnings with command completion

You can use this new feature to fix errors and warnings in your code. If you write code that doesn’t compile, IntelliJ IDEA will tell you. You can navigate to the error using F2 and press Alt+Enter to show context actions. However, Alt+Enter gives you only a few options; it is designed to give you the most relevant fixes to your problem. That means it might not always include the action you want to perform. On the other hand, command completion (..) offers you all actions that are relevant in your current context. IntelliJ IDEA will give you a preview of what each command will do.

Fix errors and warnings

Perform file- or class-level actions

It is now possible to unlock this type of completion in places where it wasn’t available before, like on a blank line. Typing a dot on a blank line now shows you file-level actions, like Reformat Code or Optimize Imports. For example, use Optimize Imports to remove an import statement that is no longer needed. 

Perform file or class level actions

Refactoring and code transformation

Command completion can also help you when refactoring or transforming your code. When writing code, you can use it to keep moving forward. For example, to create classes, methods and fields.

Keep moving forward and create classes, methods and fields

You can use it to generate code for you, such as a toString() method.

You can transform your code as you go, for example to make use of modern Java language features. For example, you can refactor a class into a record, using only command completion.

Transform code

Use command completion for navigation

You can use it for navigation. For example, we can navigate to the String class declaration. You’ll notice that this file is read only! How will we use completion here? Don’t worry, you can change your settings to be able to use command completion in read-only files!

Open the Settings for Command Completion, by using Search Everywhere (Shift Shift) and searching for “command completion”. Select the option Enable command completion for read only files. Now, you can use command completion in read-only files, for example to navigate back to where you were.

Command Completion Settings: Enable command completion for read only files.

If you want to rename your class, you can use a shortcut to do so, but you need to know this shortcut (⇧F6 on macOS / Shift+F6 on Windows/Linux). Now, you can use command completion instead. Go to the end of the class or method name you want to rename and type ..rename.

Aliases for several commands

In some cases, you don’t even need to know the exact name of the command you’re looking for, as some commands have aliases. For example, you can also use ..change name instead of ..rename.

Aliases

This makes features even more discoverable; you don't need to remember the exact name of the feature.

Complements existing features

You can still use existing shortcuts, postfix completion and live templates. Command completion is intended to complement existing features.

Imagine we declare a new instance of a class Person. To assign this new Person() to a variable, you can use the shortcut to Extract Variable (⌥⌘V on macOS / Ctrl+Alt+V on  Windows/Linux). But this requires you to know this feature exists and the relevant shortcut.

Alternatively you could use postfix completion .var to create a variable. But that would again require you to know (or quickly be able to find) this specific postfix completion.

Instead, you can now use command completion to introduce a local variable. After the declaration of the new instance, use ..Introduce local variable.

Command completion complements existing features

If you want, you can still use postfix completion. For example, you type person.sout to print variable person to System.outSystem.out.println(person);.

You can transform this code to modern Java and use features introduced in Java 25, like simple IO. After the line System.out.println(person); type .. and select ..Replace with IO.println().

You can use refactoring, like Extract Method (⌥⌘M on macOS / Ctrl+Alt+M on Windows/Linux), even if you don’t remember the shortcut. To do so, type .. and select ..Extract method after the method you want to extract.

Refactor: Extract method

What if you want to add JavaDoc to your code? You could use Alt+Enter to Add JavaDoc. But now you can also use command completion to generate JavaDoc, and convert it to Markdown.

Command completion is as easy as adding a dot, or two..

As you can see, using command completion is as easy as adding a dot, or two..

Conclusion

Command completion extends regular completion - which you already use. It lets you discover and use IntelliJ IDEA features without having to remember shortcuts. This keeps you in the flow of coding; you can think about what you want to do, instead of how to do it.

Type a . to find commands as part of regular completion, or .. to see all available commands relevant to your current context.  You might discover powerful features you never knew were there!

The post Command completion: IntelliJ IDEA with less shortcuts appeared first on foojay.

]]>
https://foojay.io/today/command-completion-intellij-idea/feed/ 0
You’re Invited to IntelliJ IDEA Conf 2025! https://foojay.io/today/youre-invited-to-intellij-idea-conf-2025/ https://foojay.io/today/youre-invited-to-intellij-idea-conf-2025/#respond Mon, 05 May 2025 10:20:30 +0000 https://foojay.io/?p=116127 Table of Contents We are excited to invite you to IntelliJ IDEA Conf 2025, a free virtual event. We are excited to invite you to IntelliJ IDEA Conf 2025, a free virtual event. IntelliJ IDEA Conf is a celebration of ...

The post You’re Invited to IntelliJ IDEA Conf 2025! appeared first on foojay.

]]>
Table of Contents
We are excited to invite you to IntelliJ IDEA Conf 2025, a free virtual event.

We are excited to invite you to IntelliJ IDEA Conf 2025, a free virtual event.

IntelliJ IDEA Conf is a celebration of the developer community, bringing together professionals who strive for excellence in software development. Join us for this free, live online conference and learn from industry leaders and experts on June 3–4, 2025.

You’ll be able to learn about a variety of topics, including Core Java, Kotlin, Java and AI, Spring Boot, GraalVM, Gradle, Junit and Kafka. For more details, see the agenda below.

Conference Details and Registration

Agenda

IntelliJ IDEA Conf 2025 will be held on two days, June 3–4, with 15 sessions in total. The conference has a single track on both days.

Find the detailed conference schedule, session descriptions, and speaker bios on the conference website.
Here’s a brief overview of the sessions which will be live streamed on the first day of IntelliJ IDEA Conf 2025, June 3:

  • 9:00–10:00 UTC, Sharat Chander, Keynote: 30 Years of Java... The Journey Continues
  • 10:00–11:00 UTC, Ignat Beresnev, Kotlin Notebooks for Spring Developers
  • 11:00–12:00 UTC, Fabio Niephaus, Tips and Tricks for GraalVM and Graal Languages in IntelliJ IDEA
  • 12:00–13:00 UTC, Rémi Forax, Valhalla Nullness Emotion
  • 13:00–14:00 UTC, Lize Raes, Next-Level Features of LangChain4j for Production-Ready AI Applications
  • 14:00–15:00 UTC, Sandra Ahlgrimm, From Zero to Hero: Java on Azure Integration With IntelliJ IDEA
  • 15:00–16:00 UTC, Josh Long, Bootiful IntelliJ IDEA

Here’s a brief overview of the sessions which will be live streamed on the second day of IntelliJ IDEA Conf 2025, June 4:

  • 9:00–10:00 UTC, Anton Arhipov, Keynote: "Sudo, Make Me a Sandwich!" – Live Coding With Agentic AI in IntelliJ IDEA
  • 10:00–11:00 UTC, Paul Merlin & Dmitrii Smirnov, IntelliJ IDEA – The IDE That Speaks Gradle
  • 11:00–12:00 UTC, Viktor Gamov, From Tower of Babel to Babel Fish: Evolving Your Kafka Architecture With Schema Registry
  • 12:00–13:00 UTC, Marc Philipp, Catching Up With JUnit
  • 13:00–14:00 UTC, Franck Pachot, The Modern Database Debate: Documents, Tables, or Documents in Tables?
  • 14:00–15:00 UTC, Sébastien Deleuze, Null Safety in Spring Applications With JSpecify and NullAway
  • 15:00–16:00 UTC, Bar-El Tayouri, Hacking and Securing AI Systems: Playing With Fire and Controlling the Flare of AI
  • 16:00–17:00 UTC, Dr. Venkat Subramaniam, Keynote: OOP vs. DOP: Which One to Choose?

Please check out the detailed agenda for speaker and session details.

Community partnership

For user group (UG) leaders, if you think these sessions will benefit your members, we invite you to become an IntelliJ IDEA Conf community partner and share the event details with your group members. The registration process is simple and only requires submitting a few details about your UG and one of its leaders.

Click here to register as a community partner.

Once your registration form is processed, you will be listed as one of our community partners and your logo will be displayed on our event page. Community partners will also receive free JetBrains IDE licenses.

Attending sessions – logistics

The first step is to register for the event!

When you register to participate in this event, you can choose to attend all sessions or only specific ones. Once your registration is complete, JetBrains will email you all of the details you’ll need to view the sessions. All of the sessions are scheduled to last for one hour.

None of the sessions at this conference are prerecorded. Sessions will be presented in real time, and speakers will answer questions either by taking quick breaks or at the end of their sessions. We encourage you to ask any questions you might have via the chat option while watching the sessions. Engaging with the speaker or your fellow participants is one of the best ways to learn.

All of the sessions will be recorded and made available for you to watch again or catch up on after the event. Don’t forget to subscribe to IntelliJ IDEA’s YouTube channel to view them.

Hashtags

Don’t miss the chance to connect with us on social media! Use the hashtag #IntelliJIDEAConf on X (formerly Twitter), Bluesky, LinkedIn, and Facebook throughout the event.

A special thanks to our speakers

This conference wouldn’t be possible without the fantastic speakers and presenters who all strive to assist developers throughout their learning journey. At JetBrains, we are very thankful for all the speakers who graciously accepted our invitation to participate in this event.

We reserve special thanks for industry experts and leaders like Sharat Chander, Ignat Beresnev, Fabio Niephaus, Rémi Forax, Lize Raes, Sandra Ahlgrimm, Josh Long, Anton Arhipov, Paul Merlin & Dmitrii Smirnov, Viktor Gamov, Marc Philipp, Franck Pachot, Sébastien Deleuze, Bar-El Tayouri and Dr. Venkat Subramaniam who have agreed to join us for this event.

We truly appreciate their support! See you at the conference!

Register now!

The post You’re Invited to IntelliJ IDEA Conf 2025! appeared first on foojay.

]]>
https://foojay.io/today/youre-invited-to-intellij-idea-conf-2025/feed/ 0
Foojay Podcast #50: JCON Report, Part 2 – Maven, Software Security, Code Quality https://foojay.io/today/foojay-podcast-50/ https://foojay.io/today/foojay-podcast-50/#respond Mon, 27 May 2024 08:07:54 +0000 https://foojay.io/?p=111124 This is part 2 of the interviews we recorded at the JCON conference earlier this month in Germany. In this episode, you get two main topics: Maven and Code Quality.

The post Foojay Podcast #50: JCON Report, Part 2 – Maven, Software Security, Code Quality appeared first on foojay.

]]>
Table of Contents
VideoPodcast AppsContent

This is part 2 of the interviews we recorded at the JCON conference earlier this month in Germany. In this episode, you get two main topics: Maven and Code Quality.

In the first part, you'll hear Karl Heinz Marbaise and Steve Poole discuss the Maven project, the repository, Sonaytype, and the security impact of dependencies.

But next to security, we developers are also responsible for creating readable and maintainable code. Miro Wengner, Marit van Dijk, and Hinse ter Schuur dive into this topic, in the second part!

Video

Podcast Apps

You can listen and subscribe to the Foojay Podcast on:

Content

00:28 Karl Heinz Marbaise: Apache Maven version 4, Sonatype, Maven Repository
https://www.linkedin.com/in/khmarbaise/
09:59 Steve Poole: Sonatype, The many languages running on the JVM, The possible impact on a company of getting hacked, Talks about software supply chain security, Maven, SBOMs,… 
https://www.linkedin.com/in/noregressions/
27:44 Miro Wengner: Talks about Disciplined Engineering 
https://www.linkedin.com/in/mwengner/
34:52 Marit van Dijk: Talks about IntelliJIDEA, reading code, and AI Assistant  
https://www.linkedin.com/in/maritvandijk/
43:50 Hinse ter Schuur: Being a sustainable developer, Talks about code reviews, merge requests, and branching  
https://www.linkedin.com/in/hinseterschuur/

The post Foojay Podcast #50: JCON Report, Part 2 – Maven, Software Security, Code Quality appeared first on foojay.

]]>
https://foojay.io/today/foojay-podcast-50/feed/ 0
Tips for reading code https://foojay.io/today/tips-for-reading-code/ https://foojay.io/today/tips-for-reading-code/#comments Tue, 26 Mar 2024 11:46:58 +0000 https://foojay.io/?p=106382 As developers, we read code more than we write it. When reading code inside the IDE, IntelliJ IDEA helps us to read and understand code by providing helpful features.

The post Tips for reading code appeared first on foojay.

]]>
Table of Contents
FormattingStructureSearchingAdditional hints: Quick Documentation & Type InformationReader modeTesting and debuggingRefactoring for understandingVersion control (Git) historyJetBrains AI AssistantConclusionLinks

As developers, we read code more than we write it. When adding new features or fixing bugs, we first need to understand existing code, so we can make the right changes in the right place.

When reading code inside the IDE, IntelliJ IDEA helps us to read and understand code by providing helpful features like syntax highlighting and inlay hints. But there are more features to help us understand a piece of code.

Formatting

We don’t read code like we do text, from start to finish. Code doesn’t run linearly! We scan code to get a feel for the shape, and to find the part we’re interested in.

IntelliJ IDEA will take care of formatting the code while we’re writing code. If we encounter code that is not properly formatted, we can have IntelliJ IDEA reformat the code for us. In the file you want to reformat, use the shortcut ⌘⌥L on macOS or Ctrl+Alt+L on Windows/Linux.

Reformat code

We can restructure the code by moving code blocks around to match our mental model, preferred style or coding conventions.

Move Statement Up and Down

Structure

There are several ways to get a quick overview of a piece of code. For example, we can collapse the code, so we only see the names of methods and not their implementation. This can help us find the specific code we are looking for more quickly. We can then expand that particular section.

Collapse and Expand Code

Note that we can still search the code when it is collapsed, and if needed the relevant section will expand.

Search Collapsed Code

Alternatively, we can look at the File Structure for a file using ⌘ F12 on macOS or Ctrl+F12 on Windows/Linux. We can navigate to the section of the code we’re interested in from here.

File Structure

We can get the same information by opening the Structure tool window, using ⌘ 7 on macOS or Alt+7 on Windows/Linux.

Structure tool window

Searching

We can search the code for specific names of variables, methods, or Strings, for example a log message. IntelliJ IDEA will highlight the results of your search in the file.

We can also search for other occurrences from the editor. For example, we can select this variable name, and press ⌘F on macOS or Ctrl+F on Windows/Linux to search for the selected string. IntelliJ IDEA will place the selected string into the search field and highlight all occurrences in the file.

Find String In File

Additional hints: Quick Documentation & Type Information

We can also ask for additional hints from our IDE. For example, we might want more information about a particular class or method that is used in the code we are looking at, but defined elsewhere in the codebase. We can navigate to other locations in the code base, and back again, but we might end up getting lost in a large code base. Even though we can ask IntelliJ IDEA to locate a file in the project structure, jumping around too much can get overwhelming.

Select In: Project tool window

Instead, we can use Quick Documentation (F1 on macOS or Ctrl+Q on Windows/Linux) to pull up the information we need in our current location.

Quick Documentation

We can also pull up Type Information using ⌃⇧P on macOS or  Ctrl+Shift+P on Windows/Linux  if we’re unsure of what type is returned by a particular method.

Type Information

Reader mode

Code might contain comments that explain the code. We can toggle to reader mode in the editor using ^⌥Q (on macOS) or Ctrl+Alt+Q (on Windows/Linux). Right-click the icon in the gutter to select Render All Doc Comments if you want all comments to show in reader mode.

Toggle Rendered Mode

Testing and debugging

To understand intended behavior of the code, we can look at the tests in the code base. To look at the code and its tests side by side, right-click the tab and select Split and Move Right.

Split and Move Right

We can run a test (or our application) through the debugger to actually see how the code is executed. First, we need to place a breakpoint at the location in the code we’re interested in. Click the gutter next to the line of code where you want to place the breakpoint, or use ⌘ F8 on macOS or Ctrl+F8 on Windows/Linux to toggle the breakpoint.

Next, we run our test (or application) using the Debug option. Execution will stop at the breakpoint, so we can investigate the state of our application. Once code execution stops at the breakpoint, we can see current values of variables and objects. 

Debug information

We can also evaluate an expression, to see its current value and look at more details. We can even change the expressions to evaluate different results. 

Evaluate Expression

We can continue execution by either stepping into (F7) a line to see what happens inside a called method or stepping over (F8) a line to go to the next line even if a method is called, depending on what we’re interested in. Finally, we can resume the program, using the shortcut ⌥⌘R on macOS or F9 on Windows/Linux, to finish the execution of the test (or continue execution of the application).

Step into, step over, resume.

If there is no test that exercises the piece of code you are interested in, you might want to add one. This can also help you verify any assumptions you might have about the code.

Refactoring for understanding

While trying to understand the code, you may want to perform small refactorings, like renaming a variable or method (using the shortcut ⇧F6 on macOS or Shift+F6 on Windows/Linux), extracting a method and giving it a meaningful name (using the shortcut ⌥⌘M on macOS or Ctrl+Alt+M on Windows/Linux), or refactor the code to a style you are more familiar with to make it easier for you to read and understand the code.

Refactor code style

Playing with the code can help you verify your assumptions and improve your understanding. Remember though, that these changes are not meant to be committed! Revert them when you’re done.

Revert changes

Version control (Git) history

We might be interested in when the code was last changed and why. We can find out by looking at the history in our version control system. If we are using Git, we can click the gutter to enable Annotate with Git Blame. Or, if you don’t like using the mouse, you can open the VCS Popup using ⌃V on macOS or Alt+` on Windows/Linux and enable or disable this option from there.

VCS Popup

In the gutter, we can now see when a line was last changed and by whom. We can hover over this information to see the commit this change was a part of and its corresponding commit message. Or we can click a line in the gutter to open the Git tool window, with the selected commit highlighted. Here, we can see the commit, its commit message and which files were changed. We can open the diff of the files to see exactly what was changed.

JetBrains AI Assistant

If you are using JetBrains AI Assistant, you can ask AI Assistant to explain the commit to you.

Explain Commit

JetBrains AI Assistant is an additional service available in IntelliJ IDEA from version 2023.3. It has several features that can help us understand our code. For example, we can ask AI Assistant to explain code, write documentation, or generate unit tests.

AI Actions

If we use the AI action Explain code without selecting any code, the entire file is selected and AI Assistant opens a chat window where it will explain the code in this file. Alternatively, we can select a specific piece of code, like a method, and perform the same action to get an explanation of that section of code.

Explain Code

We can write documentation for a class or method. Note that our cursor needs to be in the class or method for this to work. We can’t write documentation for a blank line.

Write Documentation

And of course, we can ask AI Assistant questions in the chat. For example, to explain the project.

Explain Project

Keep in mind that even if you use AI Assistant to write code for you, you’ll still need to be able to read code! You’ll need to evaluate the code provided, and understand whether that is the code you want.

Conclusion

In this tutorial we’ve looked at the many ways IntelliJ IDEA can help you read and understand code. Hopefully these tips for reading code will have you reading code like a pro.

Links

Sponsored Content

Cut Code Review Time & Bugs in Half. Instantly.

Supercharge your team to ship faster with the most advanced AI code reviews.

Get Started!

The post Tips for reading code appeared first on foojay.

]]>
https://foojay.io/today/tips-for-reading-code/feed/ 2
lntelliJ IDEA: Selectively Commit Changes to a File https://foojay.io/today/lntellij-idea-selectively-commit-changes-to-a-file/ https://foojay.io/today/lntellij-idea-selectively-commit-changes-to-a-file/#comments Thu, 21 Dec 2023 06:15:09 +0000 https://foojay.io/?p=103474 Selectively commit changes to a file using the Git integration in IntelliJ IDEA. Split unrelated changes into separate commits.

The post lntelliJ IDEA: Selectively Commit Changes to a File appeared first on foojay.

]]>
Table of Contents
Links

Sometimes you're making multiple changes to a file that you don't want to commit together. For example, if you're working on a new feature, but notice some other small things you want to fix. If these changes are in separate files, we can commit each file separately. But what if they’re in the same file?

In IntelliJ IDEA (as of version 2023.3), we can now select which chunks and specific lines we want to add to our commit.

We can see which files were changed by opening the Commit tool window (⌘0 on macOS, or Alt+0  on Windows/Linux). Here we can open the diff for a particular file to see which changes were made to that file, using ⌘D (macOS) / Ctrl+D (Windows/Linux).

IntelliJ IDEA showing a diff in a file. There are multiple checkboxes in the gutter of the changed file for different changes to the file.

In the diff, we have the option to include specific changes to our commit, by clicking the Include into commit checkbox in the gutter next to each chunk of modified, deleted or newly added code.

IntelliJ IDEA showing a diff in a file and checkboxes in the gutter of the changed file. A tooltip on a checkbox shows "Include into commit".

We can even select specific lines from a change to include in a commit. To commit only a specific line from a chunk, right-click the line you want to include and select Split Chunk and Include Current Line into Commit.

IntelliJ IDEA showing a diff in a file with a checkbox in the gutter of the changed file. The context menu shows the option "Split Chunk and Include Current Line into Commit" highlighted.

Alternatively, hover over the gutter and select the checkbox next to the line you want to include in the commit. Or, if we change our mind, we can also hover over the gutter and clear the checkbox next to the line we want to exclude.

IntelliJ IDEA showing a diff in a file. There are multiple checkboxes in the gutter of the changed file. A tooltip on one of the checkboxes shows "Include into commit".

Once we have selected all the changes we want to commit, we write a meaningful commit message, and select Commit. Any unselected changes will stay in the current change list, so that you can commit them separately later.

What if we don’t want to add these changes to the same pull request, not even in a separate commit? Maybe you want to do some more cleaning up in your code base, and create a separate pull request for those changes later. We can undo this commit and move these changes to a different change list. To do so, select Move to Another Changelist from the context menu of a modified chunk.

IntelliJ IDEA showing a diff in a file with a checkbox in the gutter of the changed file and a context menu with the option "Move Lines to Another Changelist" highlighted.

Next, we can name our new changelist. The changes will be assigned to this changelist and we can see it in the Commit tool window.

IntelliJ IDEA showing a diff in a file with a popup on top. The popup is titled Move Lines to Another Changelist and the new changelist is named "Fixes".

Links

The post lntelliJ IDEA: Selectively Commit Changes to a File appeared first on foojay.

]]>
https://foojay.io/today/lntellij-idea-selectively-commit-changes-to-a-file/feed/ 1
Virtual Event: JetBrains AI Launch Event https://foojay.io/today/jetbrains-ai-launch-event/ https://foojay.io/today/jetbrains-ai-launch-event/#respond Mon, 04 Dec 2023 11:32:32 +0000 https://foojay.io/?p=103360 Don’t miss the online JetBrains AI launch event, where we'll release our AI-powered coding companion, JetBrains AI Assistant.

The post Virtual Event: JetBrains AI Launch Event appeared first on foojay.

]]>
Don’t miss the online JetBrains AI launch event, where we'll release our AI-powered coding companion, JetBrains AI Assistant.

With JetBrains AI, your favorite tools gain new abilities while you are empowered with more information at your fingertips.

Free yourself from the routine and stay in the flow like never before!

Join the JetBrains AI launch event online! December 6, 5:00 pm (CET) | 8:00 am (PST).

Learn more about JetBrains AI and AI Assistant from the creators themselves.

The post Virtual Event: JetBrains AI Launch Event appeared first on foojay.

]]>
https://foojay.io/today/jetbrains-ai-launch-event/feed/ 0
Webinar: Harnessing the Power of AI Assistant in IntelliJ IDEA https://foojay.io/today/webinar-harnessing-the-power-of-ai-assistant-in-intellij-idea/ https://foojay.io/today/webinar-harnessing-the-power-of-ai-assistant-in-intellij-idea/#respond Tue, 28 Nov 2023 16:38:47 +0000 https://foojay.io/?p=103311 In this session, Anton Arhipov will demonstrate the capabilities of AI Assistant in IntelliJ IDEA. You will learn how the tool helps you explore and improve existing code as well as write new code in different scenarios.

The post Webinar: Harnessing the Power of AI Assistant in IntelliJ IDEA appeared first on foojay.

]]>
AI Assistant provides AI-powered features for software development based on the JetBrains AI service. The service transparently connects you, the IDE user, to different large language models.

In this session, Anton Arhipov will demonstrate the capabilities of AI Assistant in IntelliJ IDEA. You will learn how the tool helps you explore and improve existing code as well as write new code in different scenarios.

Banner for IntelliJ IDEA Livestream with title "Harnassing the Power of AI Assistant in IntelliJ IDEA" featuring Anton Arhipov.

Please join us for the livestream December 7th, 3:00 pm – 4:00 pm UTC.

Register here: https://jb.gg/wp3b82

The post Webinar: Harnessing the Power of AI Assistant in IntelliJ IDEA appeared first on foojay.

]]>
https://foojay.io/today/webinar-harnessing-the-power-of-ai-assistant-in-intellij-idea/feed/ 0
Explore project structure with IntelliJ IDEA’s Dependency Matrix https://foojay.io/today/explore-project-structure-with-intellij-ideas-dependency-matrix/ https://foojay.io/today/explore-project-structure-with-intellij-ideas-dependency-matrix/#respond Mon, 20 Nov 2023 10:28:01 +0000 https://foojay.io/?p=103189 Table of Contents Opening the Dependency MatrixInterpreting the Dependency Matrix Dependencies Expand components Limit scope Navigate to relevant code Cyclic dependencies Summary IntelliJ IDEA Shortcuts Used Related Links In this tutorial, we'll look at exploring project structure with IntelliJ IDEA's ...

The post Explore project structure with IntelliJ IDEA’s Dependency Matrix appeared first on foojay.

]]>
Table of Contents
Opening the Dependency MatrixInterpreting the Dependency MatrixSummary

In this tutorial, we'll look at exploring project structure with IntelliJ IDEA's Dependency Matrix.

When working with large, complex software projects, we need to understand the dependencies between components in your projects. IntelliJ IDEA has a feature called Dependency Structure Matrix (DSM), or Dependency Matrix, that can help us with this.

When you are new to a project, the Dependency Matrix can help you get an overview of the dependencies in the project. The Dependency Matrix can also help us get an idea of how hard it will be to split a project, based on the dependencies between components. Finally, it can help us find and untangle cyclic dependencies.

It offers a matrix of the components in our project to help you and highlights the usage flow between them. Let’s take a look!

Opening the Dependency Matrix

You can open the Dependency Matrix from the main menu by going to Code | Analyze Code | Dependency Matrix.

Open Dependency Matrix from the menu

Alternatively, use Find Action (⌘⇧A on macOS, or Ctrl+Shift+A on Windows/Linux) and search for “matrix”.

Open Dependency Matrix using Find Action

To use this feature, the Dependency Matrix plugin needs to be enabled.

Dependency Matrix plugin

When opening the Dependency Matrix, specify the scope you want to analyze. You can select the Whole project or specify a Custom scope, and whether to include test sources or not.

Dependency Matrix scope

After defining the scope, click Analyze.

If the project’s class files are out of date, the analysis may result in incomplete or incorrect data. To avoid this, IntelliJ IDEA will prompt you to compile the project before continuing the DSM analysis. Click Yes to build the project and make sure everything is up-to-date.

Dependency Matrix - Project is out of date

The DSM tool window will open in a popup, showing a matrix of your project’s components.

Interpreting the Dependency Matrix

Let’s take a look at how to interpret the Dependency Matrix.

Dependency Matrix

The row headers represent the program structure. In this example, the matrix contains the same modules from the Project tool window as rows.

Notice that the modules are not sorted alphabetically, as they are in the Project tool window. The matrix moves the components that are used the most to the bottom. This means that the components located at the top of the matrix depend on the components below.

Since this is a matrix, the column headers are the same as the row headers. They are omitted to save space. The dashes on the diagonal correspond to self-dependencies, which are not shown.

As you can see in the legend at the top right of the DSM tool window:

  • dependencies are shown in blue
  • mutual or cyclic dependencies, meaning that two components depend on each other, are shown in red
  • dependencies flow from green to yellow.

Dependencies

Dependencies are shown in blue. The numbers in the cells show the number of dependencies of the selected row on the selected column. An ellipsis (the three dots) in a cell means that there are more than 99 dependencies. Hover over the cell to get more information. In the example below, we see the tooltip "cucumber-java -> cucumber-core (209)". This means that in this project the component cucumber-java (represented in the column) depends on the component cucumber-core 209 times.

Dependency Matrix - Information on hover

You can click rows or cells to examine the relationship between the components in more detail.

When you select a row to see the relationship between the selected component and others, the selected row and corresponding column are highlighted to visualize row dependencies.

Dependency Matrix - Selected row

The column shows the dependencies of the selected row.

The row shows the dependencies on the selected row.

Remember from the legend that dependencies flow from green to yellow.

In this example, the core module is selected. You can see that this module uses several other modules, marked in yellow. In turn, you see that this module is used by several modules marked in green.

You can select different rows to see which components they use or are used by. You'll see that the components at the top mostly use the components at the bottom, while the components at the bottom are mostly used by components at the top and no longer using other components themselves.

You can drill down further into specific cells. When you click a cell, one component will be marked green and the other will be marked yellow. The green component uses the yellow component. The corresponding cell (marked purple) will show dependencies in the other direction, in this case 0.

Dependency Matrix - Selected cell

We can drill down even further.

Expand components

Right now everything is collapsed and only the modules are shown. You can click a module to expand its packages. The module name is shown to the left, the packages are shown as rows and the dependencies between the packages are shown in the matrix inside the box marked with a black line.

Dependency Matrix - Expand

You can expand the packages further to show the classes in that package, and see the dependencies between classes inside the packages. You can expand modules and packages by clicking the arrows in the rows on the left, and collapse them again.

You can also expand the modules and packages by double-clicking a cell. We can collapse everything again by using the Flatten Packages button on the top left.

Limit scope

You can limit the scope of your Dependency Matrix. Right-click the row you want to look at in more detail, and from the context menu, select Limit Scope To Selection.

Dependency Matrix - Limit Scope to Selection

The limited scope will be opened in a new tab in the DSM tool window.

Dependency Matrix - Limit Scope to Selection

You can limit the view to see only selected dependencies. In the DSM tool window, right-click the cell representing the dependency you’re interested in and select Explore Dependencies Between.

Dependency Matrix - Explore Dependencies Between

The classes that produce these dependencies will be opened in a new tab in the DSM tool window. In contrast to the Limit Scope option, only classes which produce selected dependencies are left.

Dependency Matrix - Explore Dependencies Between

Another way to open the Dependency Matrix, with the option to select a specific scope, is from the Project tool window (⌘1 on macOS, or Alt+1 on Windows/Linux). Right-click an item in the Project tool window and select Analyze | Analyze Dependency Matrix.

Analyze Dependency Matrix

Notice how you can now select the module or directory as scope for the Dependency Matrix, in addition to the whole project or a custom scope.

Analyze Dependency Matrix scope

Navigate to relevant code

We can also navigate to the relevant code from the Dependency Matrix. To select a specific dependency for further source-code analysis, right-click the dependency you are interested in in the DSM tool window, and select Find Usages for Dependencies.

Dependency Matrix - Find Usages

The Find tool window will open, showing the usages of the selected dependency. Close the DSM tool window to look at the results and explore the code you’re interested in. We can open the relevant code by double-clicking it in the Find tool window (⌘3 on macOS, or Alt+3 on Windows/Linux).

Find tool window

You can reopen the window again from the main menu by going to View | Tool Windows | DSM.

Reopen Dependency Matrix

And remember that all windows can be opened from Recent Files (⌘E on macOS, or Ctrl+E on Windows/Linux) as well.

Reopen Dependency Matrix

Cyclic dependencies

Remember from the legend that mutual or cyclic dependencies are shown in red. This means that two components depend on each other.

In a large application with multiple cyclic dependencies, you don’t need to expand all the nodes one by one to find all the cyclic dependencies. You can press F2 or select Go to Next Cycle from the context menu to quickly jump to the next cycle.

Dependency Matrix - Go to Next Cycle

Summary

In this tutorial you’ve seen how the Dependency Matrix can help visualize and explore dependencies between components in
your project.

IntelliJ IDEA Shortcuts Used

Here are the IntelliJ IDEA shortcuts that we used.

Name macOS Shortcut Windows / Linux Shortcut
Find Action ⌘⇧A Ctrl+Shift+A
Project Tool Window ⌘1 Alt+1
Find Tool Window ⌘3 Alt+3
Recent Files ⌘E Ctrl+E
Go to Next Cycle F2 F2

Related Links

The post Explore project structure with IntelliJ IDEA’s Dependency Matrix appeared first on foojay.

]]>
https://foojay.io/today/explore-project-structure-with-intellij-ideas-dependency-matrix/feed/ 0