Almost three weeks ago, I had the pleasure of speaking at Voxxed Days Zürich. This was my third time at this conference, and also my third Swiss Voxxed Days this year (which will be relevant later!).
Speaker dinner
The speaker dinner the evening before the conference is always a good time to catch up with friends and meet other speakers. Good food and drinks are a bonus.
Because the restaurant was a little loud (maybe because it was filled with speakers…), some of us ended up outside.
Photographer Dimitris Doutsiopoulos took advantage of this to take some beautiful pictures, like this one of Paco van Beckhoven and me, which my colleague Jason Torres pointed out looks like a still from a movie. (It does, doesn’t it?)
Patrick created a beautiful animation for this year’s edition. And I have to say I am rather partial to these colors. They even got the steps of the cinema to match!
During the session they called out the Voxxed Days Switzerland Champions. Apparently I was one of six speakers who spoke at all three Swiss Voxxed Days conferences: Voxxed Days Ticino, Voxxed Days CERN and Voxxed Days Zürich. As I am a sucker for vanity metrics, I really appreciated this callout. 😂
Speaking with Andres Almiray about Maven
At Voxxed Days Zürich this year, I had the pleasure to do a new(ish) talk with Andres Almiray: “Getting more out of Maven”. This was only the second time we did this talk (the first time was at JavaLand). Unfortunately we had some trouble connecting my macbook to the screen, which threw us off a little…
During the talk we discussed several tips for using Maven in IntelliJ IDEA. We showed using the Maven wrapper to increase reproducibility of the build, and the enforcer plugin to see where your build breaks. We explained Maven lifecycle and goals, as well as how inheritance works, and more. And of course, we showed some useful IntelliJ IDEA features for working with Maven and dependency management, the dependency analyzer to find conflicts in dependencies, inspections to show you when dependencies have known vulnerabilities and finally the Vulnerable API inspection which can show you whether you are actually using the vulnerable API of a known vulnerability.
And of course, our session also included some custom memes that we created for this talk. If you want to see all the memes, you can find them in this repo.
Despite the initial technical trouble, overall our session went well. We got some positive feedback, and I had a nice conversation later with some of the attendees about the topic of our talk.
Other talks
During the day I managed to catch the following talks:
Agentic AI Patterns by Kevin Dubois and Mario Fusco
This was a great talk to stay up to date with everything AI. Kevin and Marco did also have some technical trouble, when there was some interference with audio from another room, which was quickly fixes by the conference.
Are We Ready For The Next Cyber Security Crisis Like Log4Shell? by Soroosh Khodami
Soroosh showed us how easy it can be to get compromised and different ways to prevent this.
Supercharge your JVM performance with Project Leyden and Spring Boot by Moritz Halbritter
Moritz showed us how Project Leyden can help you speed up your Spring Boot applications. Mandatory watching for anyone using Java and Spring Boot!
Hallway track
And I also managed to take advantage of the hallway track, again to catch up with people.
IntelliJ IDEA supports new Java versions from day one. Several features were added to make working with Java 25 language features in IntelliJ IDEA easier.
New project
Create a new project in IntelliJ IDEA.
You can use the New Project Wizard to create a new project in IntelliJ IDEA. If you select the option to Add sample code, IntelliJ IDEA will add sample code to your project, containing a class with a main method.
If you select IntelliJ as your Build system, set JDK to 25, the sample code will be a compact source file and instance main method, introduced in Java 25.
Compact source file
Create a compact source file in IntelliJ IDEA.
Compact source files were introduced in Java 25. To create a compact source file, right-click the Project tool window (or press ⌘N (macOS) / Alt+Ins (Windows/Linux)) and select New | Java Class. In the New Java Class popup, select the option Compact source file.
This compact source file is created in the root directory of your project, even if you create it from another package. IntelliJ IDEA automatically adds an instance main method void main() to the file.
Java Compact File
Create a compact source file in IntelliJ IDEA.
To create a Java Compact File, introduced in Java 25, right-click the src/main/java directory in the Project tool window and select New | Java Compact File. IntelliJ IDEA will provide a default name for the file, so your thought process is not disrupted when you want to quickly try something out. IntelliJ IDEA automatically adds an instance main method void main() to the file.
Convert compact source file to class
Convert a compact source file to a class in IntelliJ IDEA.
Java 25 introduced the concept of implicit classes or compact source files. We can convert an implicit class to a regular class as needed. Invoke Context Actions by pressing ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) and select Convert an implicitly declared class of a compact source file into a regular class.
The reverse is also possible, should you prefer to use an implicit class at any point. To do so, use the quick-fix Convert into compact source file.
New live templates for main methods
Create an instance main method using a live template.
IntelliJ IDEA has some new live templates to add a main method to an implicit class, either with or without arguments: main, maina, psvm, psvma. Using the live templates psvm or main inside a compact source file will add the new main method, while they will continue to add the classic main method inside a class, as you can see in the preview.
Add arguments
Add args to your main method.
The new void main() method, introduced in Java 25, does not need String[] args. However, should you decide to use the args in your code, IntelliJ IDEA will help you by also adding them to the main method. Type args and press ⏎ (macOS) / Enter (Windows/Linux) to select args from code completion.
Live templates for simple IO
Add simple IO methods using live templates.
Java 25 introduces simple IO methods, such as IO.println() and readln() to make interacting with the console more convenient. IntelliJ IDEA introduces two new live templates to use these methods: iop for println() and ior for readln().
In addition, there are quick-fixes available to convert IO.println() to System.out.println(), and vice versa. Invoke Context Actions ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) on the method and select the option Replace with System.out.println() or Replace with IO.println().
Add static import for simple IO
Add a static import for simple IO methods.
Java 25 introduces simple IO methods, such as IO.println() and readln() to make interacting with the console more convenient. To use these methods in a compact source file, you don’t need to add an import. However, you can add a static import the java.lang.IO class if you prefer. Invoke Context Actions ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) on the method and select the option Add on-demand static import for java.lang.io.
Module Import
Using module import in IntelliJ IDEA.
Java 25 introduces module imports. When adding a module import, use Jump Down to see the contents of the module. When using Optimized Imports, IntelliJ IDEA will automatically remove any imports that are added by the module import. If you prefer to use single class imports, invoke Context Actions ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) and select Replace with single class imports.
If desired, it is possible to delete unused module imports when using Optimized Imports. To configure this option, open Settings | Editor | Code Style | Java and go to the Imports tab. Select the option Delete unused module imports. When this option is selected, Optimized Imports will remove unused module imports.
Conclusion
Support for Java language features in IntelliJ IDEA makes it easy to adopt and work with new Java language versions.
One of the downsides of using external dependencies, is that they might have known vulnerabilities at any time, as we have seen in the case of Log4Shell, Spring4Shell and other examples.
This means that, as developers, we have to keep track of which dependencies have known vulnerabilities and upgrade them if an unaffected version is available. Sometimes we might need to prioritize which dependencies to update when. This is where it comes in handy to know what the severity of the vulnerabilities is. And whether we are even using the vulnerable API of a vulnerable dependency. In IntelliJ IDEA, Package analysis, provided by the Package Checker plugin, and the Vulnerable API Usage inspection can do just that!
See which dependencies have known vulnerabilities
If the dependencies in your project have known vulnerabilities, IntelliJ IDEA will highlight them in the build file (`pom.xml` or `build.gradle`). When we hover over the highlighted dependency, we’ll see a list of known vulnerabilities with a link to more information, a severity score and a brief description.
Vulnerable dependency
We can click the link for a CVE number to open detailed information about that particular CVE in the Mend Vulnerability Database.
But we don’t need to leave our IDE to get more information about these vulnerabilities. In the popup, click the link Show details… to open the Vulnerable Dependencies tab in the Problems tool window.
Vulnerable Dependencies
The Vulnerable Dependencies tab contains a list of dependencies with known vulnerabilities in our project and the severity of these vulnerabilities. Some dependencies bring in transitive dependencies with known vulnerabilities; we can expand these dependencies in the list to see the transitive dependencies, their known vulnerabilities and their severity.
When we select a dependency in the list, we can see more details about its vulnerabilities in the right hand side of the tab. We see the dependency, CVE number, severity score, and a summary of the vulnerability. If we still need more information, we can click the link Read more, to open the information about this vulnerability in the Mend Vulnerability Database..
Vulnerable Dependencies – Details
Dealing with vulnerabilities
To deal with the vulnerabilities, we can use ⌥⏎ (on macOS) or Alt+Enter (on Windows/Linux) to have IntelliJ IDEA show us suggested fixes. For a vulnerable dependency, we have the option to update the dependency to an unaffected version (if one is available), ignore the vulnerability or show the vulnerability information for that dependency. The last option will show a list of all the known vulnerabilities for that dependency.
Suggested fixes
In most cases, we’ll want to upgrade the dependency instead. When we upgrade, we’ll also want to make sure that our project still builds and our tests still pass.
In some cases you may want to ignore a library that has known vulnerabilities. To do so, select the option “Ignore vulnerable <library name>” from the context action menu. In the Ignore Vulnerable Package popup that opens, select the reason you want to ignore this vulnerability. If you select Other, you’ll have the option to add a description.
Ignore Vulnerable Package
You may not want to ignore them forever though. To access the list with ignored vulnerabilities, open the IDE settings (⌘, on macOS or Ctrl+Alt+S on Windows/Linux) and go to Editor | Inspections. Expand the Security node and click Vulnerable declared dependency.
Vulnerable declared dependency
To make this easier to find, click the Filter Inspection button and select Show Only Modified Inspections. The list is located in the Options section in inspection details. Remove a dependency from the list of ignored dependencies, by selecting that dependency and clicking the remove button or using the shortcut. Once removed from this list, vulnerabilities in that dependency will no longer be ignored.
Show only modified inspections
Prioritizing updates
If our application has multiple dependencies with known vulnerabilities, you might need to prioritize which to update first. You can look at the severity of the vulnerabilities, but you might want to know whether your code is actually using the vulnerable part of a dependency.
If we are looking at code that calls the vulnerable API of a dependency, this code will be highlighted in the editor. When we hover over the highlighted code, we see a list of vulnerabilities found in this API call.
Vulnerabilities found in API call
We can use Show Intention Actions (⌥⏎ on macOS or Alt+Enter on Windows/Linux) and select Go to file with declared dependency from the menu.
This will take us to the place in the build file where the dependency is declared, where we can use ⌥⏎ (on macOS) or Alt+Enter (on Windows/Linux) again to Update to unaffected version.
Go to file with declared dependency
Find out whether our code is using the Vulnerable API
But what if you’re not working on the exact file that uses the vulnerable API? How can you find out whether your code is using a vulnerable API anywhere in your project?
We can run the Vulnerable API usage inspection manually to get a report about all vulnerable APIs usages in our project. To run an inspection by name, we can go to Code | Analyze Code | Run Inspection by Name in the main menu, use Search Everywhere (⇧⇧ on macOS or Shift+Shift on Windows/Linux) to look for “Run inspection by Name”, or use the shortcut ⌘⌥⇧I (on macOS) or Ctrl+Alt+Shift+I (on Windows/Linux).
Run Inspection by Name
In the Enter inspection name popup that opens, type the name of the inspection you want to run: “Vulnerable API usage”.
Enter inspection name
Next, select the scope you want to run this inspection on. You could run the inspection on a file or custom scope, or use the File mask(s) option to narrow down the number of files that will be inspected. In some cases you might only want to look at a part of your application. In other cases, you’ll want to run the inspection on the whole project.
Scope
The results of the inspection will open in a tab in the Problems tool window.
Inspection results
The results will be shown on the left. Click one of the results to open a preview of that result on the right. This gives you the option to Go to file with declared dependency, which will navigate to the place in the build file where the relevant dependency is declared, and we can upgrade the dependency to the unaffected version from there. Alternatively, double-click the result to navigate to the affected code in the editor, to see exactly where and how the vulnerable API is used.
Vulnerable API Usage
Supressing inspections
Notice that it is also possible to Suppress the inspection. We can suppress the inspection either for the statement or the class, or suppress all inspections for the class.
Suppress
When you suppress an inspection, IntelliJ IDEA adds a new element before the selected symbol. When we select suppress for class, IntelliJ IDEA adds the `@SuppressWarnings` annotation. For statements, the `//noinspection` comment is added.
When an inspection is suppressed, the problem found by this inspection is no longer highlighted. To re-enable a suppressed inspection, delete the annotation or comment that the IDE has added before the selected symbol.
Suppressed vulnerability
Upgrade dependency
Since we’re actually using the vulnerable API for this dependency in this example, we’ll definitely want to upgrade it! We can go to the file with the declared dependency, and use Intention actions (⌥⏎ on macOS or Alt+Enter on Windows/Linux) to upgrade to the unaffected version. If needed, Load Maven Changes (⌘⇧I on macOS or Ctrl+Shift+O in Windows/Linux) to import the updated dependency.
Conclusion
When we have resolved the vulnerable API usage, when we run the Vulnerable API inspection again, we will get the result: “Code inspection did not find anything to report.”
Knowing whether our code uses a vulnerable API can help us developers better prioritize which dependencies to update.
In this tutorial, you will learn how to create and run a simple Java application that prints Hello, World! to the system output. Along the way, you will get familiar with IntelliJ IDEA features for boosting your productivity as a developer: coding assistance and supplementary tools.
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 haveto.
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.
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.out: System.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!
In June, I presented the talk Learning modern Java the playful way with Piotr Przybył at Devoxx Poland 2025. For this presentation, I thought it would be funny to have a custom progress bar running in IntelliJ IDEA during our demos. Since we adapted our presentation to the Polish audience a little, I figured a Polish flag and #PolishSmile would be appropriate.
Creating an IntelliJ IDEA plugin
As I had never implemented an IntelliJ IDEA plugin before, I had no idea how hard it would be. When I asked my colleague, Anton Arhipov, he suggested using Junie to vibe code it. And given that this was just a fun idea for a plugin intended to be used only once, it was the perfect candidate for vibe coding: We don’t care that much about the code quality, since we won’t be maintaining it. All we need is for the plugin to work.
We started a new project using the Plugin template on GitHub. While Junie may or may not be able to do the configuration for such a project, there is a deterministic template available; why not use that?
When you open the project, IntelliJ IDEA will show a popup Suggested plugin Plugin DevKit available. Clicking the button Configure plugins will open Settings | Plugins with this plugin selected and the option to Install it.
Using Junie for vibe coding
Then we started with a prompt asking Junie to implement the plugin similar to the Nyan Progress Bar plugin. The prompt we used was as follows:
“Please implement a progress bar plugin similar to the nyancat progress bar. Instead of Nyancat I want it to display a Polish flag on the progress bar instead of the rainbow and a neutral smile emoji instead of the nyan cat. PLease suggest a detailed implementation plan and implement the plugin.”
Junie correctly identified that no implementation was available and set about creating one. Before doing so, it first scanned the project and looked at the README and plugin.xml, correctly identifying that “the project is based on an IntelliJ platform plugin template”.
The plugin template project includes multiple Gradle goals, including runIDE; which allows you to run your plugin on an instance of the IDE so that you can try it out. This is perfect for our vibecoded project, since all we care about is whether the plugin does what we want.
When Junie is done, it will say so in the Junie tool window and give an overview of files that were changed. The links to the files are clickable, if you want to look at the diff for these files.
First results
The first implementation of the progress was a step in the right direction but not quite what we wanted. Instead of a continuous Polish flag, it showed only small sections of white and red. Also, while the code referenced an icon, no icon was available, so we had to download a Polish smile emoji ourselves and add it to the project in the right location. We also had to manually resize this image to fit the progress bar, which unfortunately made it slightly pixelated…
One of the things I like about Junie is that it can to build your project, and will try to fix any issues if the project doesn’t build successfully. It might not try to do so every time (AI is non-deterministic after all), so if it doesn’t you might want to add something to your `.junie/guidelines.md` along the lines of “DO make sure the project builds successfully.
Also, Junie might stop if it cannot resolve issues in several tries. This is usually a hint to either break up the task into smaller pieces and/or provide more detailed information.
In our example, we tried prompting Junie to make the Polish flag on the progress bar continuous, but with no luck. We used the following follow up prompt:
“i want the brogress bar to be continuous and smooth and it should move 5 times slower”.
(Note that even though the prompt has typos, Junie doesn’t seem to mind.)
Providing a code example for better results
Unfortunately, this prompt did not have the desired outcome. Instead, Anton had the idea to take part of the Nyan Progress Bar plugin implementation and provide that code to Junie as an example to work with. We did so and used the following prompt:
“analyze the code in NyanCatProgressBar.txt (it is in Java) and create PolishFlagBProgressBar in Kotlin by following the same logic but with the polish flag colors”
This turned out to be a great idea; the plugin showed a continuous Polish flag now. This goes to show that providing Junie with examples of what you want will lead to better results.
Unfortunately, the smiley still jumped up and down on the progress bar, which is not what I wanted. But I figured it was good enough for a plugin I would only use for fun anyway. It wasn’t until after the conference that I realised that the smiley jumped up and down because that is what the Nyan Cat does in the Nyan Progress Bar. It took me five minutes to prompt Junie to fix this.
The next challenge was to build the plugin in a way that I could install it in IntelliJ IDEA from disk (as I had no plans to publish the plugin). A plugin project can be built using the task buildPlugin. Unfortunately this didn’t work for our project. It took several tries to get Junie to fix it, but I have to say that I was impressed that Junie fixed my Gradle problem.
Installing the plugin
Once the project was built successfully, I could install it. To install a plugin from disk, open Settings (⌘, on macOS) / Ctrl+Alt+S on Windows/Linux) and go to Plugins. On the Plugins page, next to Marketplace and Installed, click the icon to Manage Repositories, Configure Proxy or Install Plugin from Disk. From the menu, select Install Plugin from Disk, and select the .jar file for the built plugin from your file system.
Uninstalling the plugin
When it came time to uninstall the plugin, I found that I had trouble doing so. Fortunately my colleagues were able to provide a workaround. To manually uninstall the plugin, delete the plugin from the plugins main directory, which you can find in Help | Diagnostic Tools | Special Files And Folders.
Results
Remember, this plugin is not meant to be published to the marketplace. However, if you’re interested in the code, you can find it here.
Overall, it was fun vibe code something silly with Junie and I am happy with the result. Also, it turns out, I could actually reuse the plugin when speaking in Poland again.
Recently my friend Piotr posted a question on social media about how to format records in IntelliJ IDEA…
How to format records
Sidenote: I don’t know why he wouldn’t just ask me directly, but I guess this was more fun 😉
Configuring code style
IntelliJ IDEA can format your code for you. Code will be formatted as you type it, and if needed you can Reformat the code (⌘⌥L on macOS) / Ctrl+Alt+L on Windows/Linux). If the (pre)defined code style isn’t to your liking, you can change it.
By default, IntelliJ IDEA will format records with the curly braces {} on two lines. When you apply Reformat to a record, IntelliJ IDEA will let you know “No lines changed: content is already properly formatted”.
Content is already properly formatted
To change the formatting for records so that the curly braces {} will be on the same line, open Settings (⌘, on macOS / Ctrl+Alt+S on Windows/Linux) and go to Editor | Code style | Java. Open the tab Wrapping and Braces and in the section Keep when reformatting select the option Simple classes in one line. Don’t forget to Save Changes.
Settings – Code style
Now if we have any code with a record (or any other simple class), we can use the Reformat the code (⌘⌥L on macOS) / Ctrl+Alt+L on Windows/Linux) to reformat the simple class accordingly. Note that you’ll need to use the shortcut twice to remove custom line breaks.
The same formatting will be applied in other situations. For example, when we add another record to the file, and use Complete Current Statement (⌃⇧⏎ on macOS / Ctrl+Shift+Enter on Windows/Linux), our new record will be completed with the curly braces {} on one line.
What about generating a new Record?
From the Project tool window, we can generate a new record. Use GenerateNew (⌘N on macOS / Alt+Ins on Windows/Linux) and select Java class. In the New Java Class dialog, type the name of your new record, and select Record. Note this record is still generated with the curly braces {} on 2 lines.
To make sure a newly created record is also formatted with the curly braces {} on one line, we can change the File template for Record.
Open Settings (⌘, on macOS / Ctrl+Alt+S on Windows/Linux) and go to Editor | Code style | File and Code Templates. Open the template for Record and change the template to have the curly braces {} on one line. Again, don’t forget to Save Changes.
File and Code Templates – Record
Now when we generate a new record it will be formatted with the curly braces {} on one line.
Note that changing only the File Template for Record is not enough to format records with the curly braces {} on one line. For one, it will be immediately reformatted upon creation according to the code style, as long as the Reformat according to style box is checked for this file template. Even if we uncheck this option, reformatting a file with a record would reformat it to the code style (which by default is {} on 2 lines).
Used to determine whether a user is included in an A / B or Multivariate test.
18 months
_ga
ID used to identify users
2 years
_gali
Used by Google Analytics to determine which links on a page are being clicked
30 seconds
_ga_
ID used to identify users
2 years
_gid
ID used to identify users for 24 hours after last activity
24 hours
_gat
Used to monitor number of Google Analytics server requests when using Google Tag Manager
1 minute
_gac_
Contains information related to marketing campaigns of the user. These are shared with Google AdWords / Google Ads when the Google Ads and Google Analytics accounts are linked together.
90 days
__utma
ID used to identify users and sessions
2 years after last activity
__utmt
Used to monitor number of Google Analytics server requests
10 minutes
__utmb
Used to distinguish new sessions and visits. This cookie is set when the GA.js javascript library is loaded and there is no existing __utmb cookie. The cookie is updated every time data is sent to the Google Analytics server.
30 minutes after last activity
__utmc
Used only with old Urchin versions of Google Analytics and not with GA.js. Was used to distinguish between new sessions and visits at the end of a session.
End of session (browser)
__utmz
Contains information about the traffic source or campaign that directed user to the website. The cookie is set when the GA.js javascript is loaded and updated when data is sent to the Google Anaytics server
6 months after last activity
__utmv
Contains custom information set by the web developer via the _setCustomVar method in Google Analytics. This cookie is updated every time new data is sent to the Google Analytics server.