Code

IntelliJ IDEA: What is this IDE and how to use it?

IntelliJ IDEA: What is this IDE and how to use it? / Skillbox Media

Python Learning: Free Mini-Course for All Levels of Creation Portfolio: 4 unique projects and interaction with the speaker Find out what skills you can develop in our course

Learn more

IntelliJ IDEA is a multi-platform development environment developed by JetBrains in 2001. The term "multi-platform" means that this environment can be used on various operating systems, including Windows, macOS, and Linux distributions.

Initially, the IntelliJ IDE only supported the Java language, but over time, the development team expanded the functionality to include support for languages ​​such as Kotlin, Python, JavaScript, as well as markup languages ​​such as HTML and XML. In addition, the IDE has integrated popular frameworks, including Spring Boot, Hibernate, and JUnit. Over the past two decades, IntelliJ has developed a rich set of plugins and tools that make programming much easier.

Now let's take a closer look at this development environment, find out the differences between its versions, and get acquainted with the interface and key functions.

Contents

  • Variety of IntelliJ IDEA versions and functionality
  • Characteristic features of the new version
  • IntelliJ IDEA is a powerful integrated development environment (IDE) designed for working with programming languages ​​such as Java, Kotlin, Groovy, and many others. Using this environment may seem complicated for beginners, but by following a few basic steps, you can quickly master its functionality.

    Initially, after installing IntelliJ IDEA, launch the program. On the start screen, you will be asked to create a new project or open an existing one. If you choose to create a new project, specify the programming language and settings, such as the Java JDK version.

    After creating the project, the main window will open, consisting of various panels: the code editor, the file inspector, and the console. In the code editor, you can write and edit your code. IntelliJ IDEA offers many features, such as autocompletion, syntax highlighting, and refactoring, which greatly facilitate the development process.

    Working with files and folders is carried out through the project panel, where you can add, delete, or move files. To run your application, use the Run button or use the Shift + F10 keyboard shortcut. You can also see the output of your program in the console, which will help you debug your code.

    In addition, IntelliJ IDEA supports integration with version control systems such as Git. You can easily save changes, create branches, and merge them directly from the IDE interface.

    Don't forget about the large number of plugins that can significantly expand the functionality of the environment. You can install additional plugins through the built-in manager, which will help you customize IntelliJ IDEA to your needs.

    By following these tips, you can use IntelliJ IDEA effectively and make the development process more convenient and productive.

  • A chatbot with artificial intelligence is a modern solution for communicating with users.
  • IntelliJ IDEA has both positive and negative aspects.

    Among the advantages of this tool are its powerful intelligent assistance features, which significantly simplify the coding process. Integration with various version control systems and support for many programming languages ​​make it a universal solution for developers. Also worth noting is the user-friendly interface, which allows you to quickly find the functions you need and customize the workspace.

    Among the disadvantages, one can highlight the high system requirements, which can be a problem for users with outdated computers. In addition, some developers note that the license cost can be quite high, especially for teams using multiple copies of the program. Finally, while the functionality is extensive, there may be a bit of a learning curve for beginners due to the large number of features and settings.

Variety of IntelliJ IDEA Versions and Features

There are two editions of the program:

  • IntelliJ IDEA Community Edition is a free version with certain limitations in functionality. Although this version does not provide support for most popular frameworks, you can still develop any application, but the process will be more complex and time-consuming.
  • IntelliJ IDEA Ultimate Edition is a paid version that offers a significantly wider range of tools for software development professionals. A free 30-day trial is also available.

The following section summarizes the main differences between the standard and advanced versions of IntelliJ IDEA:

This is not a complete list of IntelliJ IDEA features; A number of features become available by installing additional plugins.

Key features of the updated version: AI assistant and enhanced performance analysis

IntelliJ IDEA Welcome 2023.2 Ultimate EditionScreenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

AI Assistant is an AI-powered chatbot powered by the OpenAI platform. This tool enables users to request coding, create tests, refactor existing code, add documentation comments, and perform a number of other important development tasks. The beta version will be available on January 18, 2024.

Enhanced Profiler. The latest IntelliJ IDEA update introduces more advanced code recommendations, line-by-line performance analysis, and the ability to quickly find solutions to problems in just a few clicks.

GitLab Integration. Now, in the IDEA development environment, you can set up a GitLab account, which allows you to access remote projects, clone them, and leave comments on code in repositories.

Here are the main new features of the latest release. For information about other changes, visit the official JetBrains website.

IntelliJ IDEA Basics: A Step-by-Step Guide

Now that we have familiarized ourselves with the available features, we can move on to the installation process and start working in this environment.

Get the IntelliJ IDEA installation file from the JetBrains website. Decide whether you need the free Community edition or the paid version corresponding to your operating system, and open the downloaded file. Then simply follow the instructions that appear on the screen.

For a more detailed study of the installation process of Java tools and the IntelliJ IDEA development environment, we recommend reading our other article, where each step is described in detail.

Screenshot: JetBrains official website / Lev Sergeev for Skillbox Media

In IntelliJ IDEA, each application is developed within a separate project, which is a folder containing text files with source code and all components necessary for development. When you first open this environment, you will see the start window where you can create a new project and set up your workspace.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

To initiate the creation of a project, click on the + icon (New Project). A window will open on the screen, offering you the settings for your new project.

Look at the section with generators in the Community (left) and Ultimate versions, shown in the following screenshot:

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

These project templates already contain integrated and configured frameworks, allowing you to get started quickly.

Let's develop a basic Java 21 project that integrates Maven and a Git repository, and includes starter code. To select these parameters, open the settings window by clicking the Create button: File → New → Project → New Project.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Using Maven, the integrated development environment created a directory structure suitable for large-scale projects. It also generated the necessary configuration files, including explicitly specifying the Java version for the compiler. In addition, the code for the "Hello World" program and a simple loop for outputting data to the console were generated.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

To activate the application, you can click on the green triangle located above the window with the code, use the keyboard shortcut Shift + F10, or go to the «Run» tab. and select the option «Run Main.java».

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

In subsequent When you launch IntelliJ IDEA, it will automatically open the last project you used. However, you can change this behavior in the program's settings so that you'll be prompted to select a project each time you launch it. Go to the File menu, then select Preferences (or press Ctrl + Alt + S). Next, go to the Appearance and Behavior section, and then open System Preferences. Here you can configure the option to reopen projects on startup.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media
Image: Lev Sergeev for Skillbox Media

The IntelliJ IDEA interface is somewhat complex, but it also offers a wide range of customization options. To launch a project or a specific part of it, use the top control panel, where the "Tools" option is located (the green triangle in the image above). On the right is a toolbar that provides quick access to notifications, the database, the build system, and installed plugins. On the left is a project window displaying its structure. To get more detailed information about the project, go to the File → Settings → Project Structure tab using the keyboard shortcut Ctrl + Alt + S on Windows or ⌘ + on macOS.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Any area can be moved with the mouse by holding down the left mouse button. It can also be split into a separate window or closed.

Windows can be opened by clicking the Tool Window button in the View section. You can also duplicate the editor window or split it into multiple parts. To do this, right-click the file tab located above the window and select Split Right or Split Down from the menu that appears. In addition, window management is possible using keyboard shortcuts: Alt + number.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Using hotkeys Keyboard shortcuts in IntelliJ IDEA significantly speed up and facilitate the development process, so it's helpful to always have them at hand, and even better, to memorize them.

Alt + Enter allows you to select the environment's suggested fix for selected sections of code. Pressing F2 allows you to quickly navigate to highlighted code elements containing errors or warnings. You can configure the rules for corrections in the File → Settings → Editor → Intentions section.

Alt + Insert

Develop a constructor, as well as access methods (getters and setters), and override the standard methods of the object.

Combination of Ctrl keys together with scrolling of the mouse wheel.

The scale can be increased or decreased.

This function is activated and deactivated in the menu: File → Settings → Editor → General → Mouse Control → Change the font size with Ctrl + mouse wheel.

Here are some familiar keyboard shortcuts that will help you manage in this environment (some of them may already be familiar to you):

Key combination Ctrl + Alt + S opens the settings menu.

Ctrl + F — search;

Ctrl + Alt + Shift + S — opens the project structure;

The combination Alt + 0–9 allows you to open various toolbars.

The combination Alt + Home opens the navigation panel.

The keyboard shortcut Ctrl + F9 is used to build the project.

The keyboard shortcut Shift + F10 is used to start running the project.

To run the project in debug mode, use the keyboard shortcut Alt + Shift + F9.

You can adapt these keyboard shortcuts to your preferences in the settings section: File → Preferences → Keyboard Layout.

Hotkey settings menuScreenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

The latest updates of the integrated development environment (starting with version 2022.3) introduced a more compact interface called New UI. In this new design, panels and tools that are used less frequently have been hidden.

Old IntelliJ IDEA themeScreenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media
New IntelliJ IDEA themeScreenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

To activate the new interface, go to settings by selecting File → Settings (or pressing Ctrl + Alt + S), then go to the Appearance section & Behavior and find the New UI option, where you can enable the new interface.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

After activating this configuration The integrated development environment (IDE) will prompt you to restart the application. This is necessary for the changes to take effect. Basic palette settings can be found in the settings section by going to File → Settings → Editor.

To connect and configure a database, go to File → New → Data Source. Select the desired database, for example, Postgres, and fill in the appropriate fields with your connection information, such as username and password. After that, click Apply and OK.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Connection to the database can be achieved by clicking Click on the Database button on the right: Database → Data Source.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

After connecting your database, the console will open to work with queries (Query Console). You can activate it using the keyboard shortcut Ctrl + Shift + Q. In this console, you can send queries to the database directly from the development environment and display tables in a visual format.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

IntelliJ IDEA offers a wide range of plugins that can significantly expand the capabilities of the development environment and make working with certain functions more convenient. You can configure and explore the available plugins by going to File → Settings → Plugins, or simply clicking the settings icon on the top toolbar and selecting Plugins.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

In the next section, we'll look at installing plugins, using the latest AI assistant as an example.

Artificial Intelligence in Chatbot Format: New Horizons of Communication

In the latest IntelliJ IDEA update, the development team implemented an AI-powered chatbot capable of generating code and documenting it. Let's activate this feature and test it out.

Go to the plugins section by selecting File → Preferences → Plugins. In the search bar, enter «AI Assistant», then select the first plugin from the list that appears and click the «Install» button.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Restart your IDE. If the process completes successfully, you will see the AI ​​Assistant icon in the right toolbar. Click it and you will be prompted to log in to your JetBrains account:

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

After you enter your login and password, a notification will appear on the screen: «You You are on the waiting list. Once your participation is approved, you will receive an invitation by email. This means you are now on the waiting list, and the waiting time may exceed one week. After this period, the beta version of AI Assistant will be available to you.

It's quite simple: formulate the necessary request and send it. For example: Create a graphical application that will display the phrase "Hello World" on the screen. using capital letters.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

We take the code created by artificial intelligence and place it it into our working environment. If necessary, we fix the errors that will be marked by our IDE, connect the necessary libraries, which the AI ​​will also prompt, and run the program.

Screenshot: IntelliJ IDEA / Lev Sergeev for Skillbox Media

Strengths and Weaknesses of IntelliJ IDEA

Today you've gotten to know the cutting-edge, feature-rich, and constantly evolving IntelliJ IDEA development environment. You've explored its key capabilities and learned about new features that make the development process more convenient. However, like any other software product, IntelliJ IDEA has its drawbacks:

  • The Ultimate version is not available for purchase in Russia. The free version has significant functionality limitations, and the premium version is not available for purchase because JetBrains has temporarily stopped selling its products and services in Russia.
  • In some cases, errors may occur in large projects. For example, code validation may not work properly, or the autocompletion feature may slow down. This manifests itself in the fact that the integrated development environment (IDE) does not recognize written functions and does not display a list of methods for objects.
  • Uses a significant amount of resources. When working with large projects, the environment can consume a lot of RAM and processor resources, which, in turn, can negatively affect the performance of your computer.
  • Confusing interface. Although we highly value JetBrains products for their many features, novice programmers may find the large number of buttons and additional windows in the development environment intimidating.

However, frankly speaking, IntelliJ's positive aspects significantly outweigh the negative ones:

  • The intelligent editor is truly intelligent. The integrated development environment provides a variety of options for code optimization, offering simpler and more relevant approaches.
  • Support for various programming languages. Although initially developed only for Java developers, this program now supports Python, JavaScript, and HTML code, and includes support for major JavaScript frameworks.
  • A comprehensive set of specialized tools includes debugging, profiling, and code refactoring tools. It also features ready-made solutions for working with databases, tools for building and deploying applications, version control systems, and much more.
  • Support and continuous improvement. JetBrains regularly updates IntelliJ IDEA, fixing bugs and introducing new features.
  • The JetBrains website provides clear documentation that answers frequently asked questions. It covers various scenarios for using the environment in detail, supplemented by illustrations. You'll find step-by-step guides on installing plugins, setting up configurations, and debugging and testing your code.
  • With artificial intelligence, starting with version 2023.2, a built-in chatbot has been added that can make it easier to write simple code and create supporting documentation. It can also help with naming variables and solving various small tasks. While it doesn't seem particularly smart at the moment, this feature is still quite useful.

If you're interested in learning more about coding, join our Telegram channel. We'd love to see you among our subscribers!

Read also:

  • Installing the JDK and the IntelliJ IDEA IDE requires several steps.

    First, let's start with installing the JDK. Go to the official Oracle website or the OpenJDK download page. Select the JDK version appropriate for your operating system and download the installation file. Once the download is complete, run the installer and follow the on-screen instructions to complete the installation. Be sure to add the JDK path to your PATH environment variable so that your system can recognize it. Now let's install IntelliJ IDEA. Go to the JetBrains website and find the section dedicated to IntelliJ IDEA. Select the appropriate edition—Community or Ultimate, depending on your needs—and download the installation file. Run it after downloading and follow the instructions in the installation wizard. Once the installation is complete, open IntelliJ IDEA. When you first launch it, you will be prompted to configure the environment. You can import settings from previous versions, if any, or select the default settings. Also, make sure that IntelliJ IDEA has detected the installed JDK. If it hasn't, specify the path to the JDK manually in the settings. Your development environment is now ready to use. You can create a new project, select the necessary settings, and start programming.

  • "I've been working at Sber for almost two years now": a Java developer's journey, full of both failures and achievements.
  • The JDK, or Java Development Kit, is a set of tools designed for developing software in the Java language. It includes a compiler, runtime, and various libraries that allow programmers to create, test, and debug Java applications.

    The main function of the JDK is to provide developers with everything they need to write code, compile it into executable files, and then run these files on various devices. In addition, the JDK contains many utilities and tools that simplify the development process, such as debuggers and profilers.

    Thus, the JDK is an indispensable tool for anyone developing Java software, providing the necessary infrastructure and resources to effectively complete their tasks.

If you want to learn more exciting information about coding, join our Telegram channel!