[IntelliJ IDEA] How to automatically add final when saving a Java file

Thing you want to do

--When writing Java code, I want to add final to the variables that I want to be immutable. ――However, it is difficult to write final every time, so I want to add final automatically when saving a file.

environment

manner

Save Actions Since the plugin is used, press "IntelliJ IDEA"-> "Preferences"-> "Plugins" and save. Install Actions スクリーンショット 2020-09-27 0.19.02.png

Press "IntelliJ IDEA"-> "Preferences"-> "Other Settings"-> "Save Actions" Check the following items and press "Apply", "OK"

スクリーンショット 2020-09-27 0.20.34.png

Now, when you execute "Cmd + s", final will be added automatically. sample1.gif

Recommended Posts

[IntelliJ IDEA] How to automatically add final when saving a Java file
[Xcode] How to add a README.md file
[IntelliJ IDEA] How to format only local changes when saving the source code
How to jump from Eclipse Java to a SQL file
How to use java non-standard library on IntelliJ IDEA
How to convert a file to a byte array in Java
How to add columns to a table
How to make a Java container
[Java] How to create a folder
How to make a Java array
How to create a new Gradle + Java + Jar project in Intellij 2016.03
How to automatically operate a screen created in Java on Windows
[Java] How to use the File class
[Java] How to add data to List (add, addAll)
How to add a new hash / array
How to add jar file in ScalaIDE
[Introduction to Java] How to write a Java program
How to make a Discord bot (Java)
How to print a Java Word document
How to record JFR (Java Flight Recorder) and output a dump file
How to find out the Java version of a compiled class file
How to pass a proxy when throwing REST over SSL in Java
How to track when a bucket managed by scoop changes (mainly Java)
What to do when you think you can't do Groovy-> Java in IntelliJ IDEA CE
[Rails] How to write when making a subquery
How to display a web page in Java
How to convert a solidity contract to a Java contract class
A story about trying to operate JAVA File
How to add a classpath in Spring Boot
How to ZIP a JAVA CSV file and manage it in a Byte array
Add jar file obtained from Maven to IntelliJ
[Java] How to get the redirected final URL
How to log in automatically when Ubuntu restarts
How to automatically generate a constructor in Eclipse
How to save a file with the specified extension under the directory specified in Java to the list
How to create a Java environment in just 3 seconds
java: How to write a generic type list [Note]
[Java] How to play rock-paper-scissors (equivalent to paiza rank A)
[Java] How to extract the file name from the path
How to add characters to display when using link_to method
How to create a Spring Boot project in IntelliJ
How to create a data URI (base64) in Java
[Java] How to get a request by HTTP communication
What to do when rails creates a 〇〇 2.rb file
[Java] How to execute tasks on a regular basis
How to download a file (Servlet, HTML, Apache, Tomcat)
[Java] How to cut out a character string character by character
[Java] How to erase a specific character from a character string
How to convert A to a and a to A using AND and OR in Java
[Java] How to start a new line with StringBuilder
When I switched to IntelliJ, I got a lot of differences in the encoding of the properties file.
How to batch initialize arrays in Java that I didn't know when I was a beginner
How to reduce the load on the program even a little when combining characters with JAVA
How to automatically generate ER diagram when migrating with Rails6
How to request a CSV file as JSON with jMeter
How to read your own YAML file (*****. Yml) in Java
[Ruby] How to split each GraphQL query into a file
How to decompile apk file to java source code with MAC
How to create a lightweight container image for Java apps
How to deploy a simple Java Servlet app on Heroku
[Easy] How to automatically format Ruby erb file with vsCode