Refactoring

Refactoring

Keep your code solid, dry, and easy to maintain.

Refactoring is a process of improving your source code without creating a new functionality. It helps you keep your code solid, dry, and easy to maintain.

See Also

Migrating from the `javax` to `jakarta` namespace

Tutorial

Migrating from the `javax` to `jakarta` namespace
How to transition your application from Java EE to Jakarta EE.
Extract Method

Tip

Extract Method
Extract code to a new method.
Generate documentation with AI

Tip

Generate documentation with AI
AI can help you make XML documentation both automatic and useful.
File-scoped namespaces and types

Tip

File-scoped namespaces and types
Organize code better and reduce bugs by using file-scoped namespaces and objects.
C# Top-level statements

Tip

C# Top-level statements
Use top-level statements in C# to reduce boilerplate code.
Global usings

Tip

Global usings
Organize `using` statements so they're out of your way.
Refactoring

Part of tutorial

Refactoring
Refactoring code for understanding.
Refactor rename with AI Assistant

Tip

Refactor rename with AI Assistant
Use the power of AI Assistant for even better naming suggestions.
Inline Variable

Tip

Inline Variable
Sometimes inlining a variable can make your code more readable.
Introduce Variable

Tip

Introduce Variable
Refactor your code and introduce a new variable right when you need it.
Generate Code

Tip

Generate Code
Helps you to generate commonly used code constructs.
Highlights of GoLand 2023.3

Playlist

Highlights of GoLand 2023.3
Explore key features and enhancements in GoLand 2023.3.
Create a Function in Another Package

Tip

Create a Function in Another Package
Type a non-existing function name and generate its implementation in a package of your choice.
Empower your `Printf`-like functions with coding assistance

Tip

Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions.
Introduce Parameters from Unresolved References in your Code

Tip

Introduce Parameters from Unresolved References in your Code
Change a function or method signature by introducing parameters directly from unresolved references
Use collection initializers

Tip

Use collection initializers
Update and initialize items in old collection declarations.
Rename refactoring

Tip

Rename refactoring
Would a variable by any other name read as clearly?
Extract method refactoring

Tip

Extract method refactoring
Split and Organize code into DRY, discrete units.
Inline method refactoring

Tip

Inline method refactoring
Replace usages of a function with its implementation.
Replace Assets

Part of tutorial

Replace Assets
Replace assets on your scene. It's like refactoring, but visually!
C# 11 - Required Keyword

Tip

C# 11 - Required Keyword
Introducing the required keyword for fields and properties.
Refactor Rename

Tip

Refactor Rename
Quickly renaming classes, methods, and variables in IntelliJ IDEA.
Extract Variable

Tip

Extract Variable
Extract code to a variable
Refactor This

Tip

Refactor This
You can use one keyboard shortcut for all refactoring options inside your IDE.
Merge/Unmerge If Statements

Tip

Merge/Unmerge If Statements
Experiment with your code without changing the semantics.
Inject a Language

Tip

Inject a Language
Language injections let you work with pieces of code in other languages embedded in your code.
Pattern Matching for Switch

Tip

Pattern Matching for Switch
This feature is available in preview from Java 17.
Manage VCS Changelists in IntelliJ IDEA

Tip

Manage VCS Changelists in IntelliJ IDEA
Group and commit changes related to certain tasks so you have a cleaner commit history.
Write SQL queries using popular database packages

Tip

Write SQL queries using popular database packages
Work with SQL queries and get completion and other features automatically.
Refactor Names in React useState Hooks

Tip

Refactor Names in React useState Hooks
Rename both values of from useState hooks at once
Extract Type Refactoring

Tip

Extract Type Refactoring
Extract a type into its own definition and improve the reusability in your code.
Rename Go Module Refactoring

Tip

Rename Go Module Refactoring
Upgrade Go modules to newer versions with ease
Refactoring Code with ReSharper

Part of tutorial

Refactoring Code with ReSharper
How to safely refactor code, without breaking the build? Let's have a look.
Add Overload Bool

Tip

Add Overload Bool
Refactor a method to change its signature and update your code to reflect the new signature.
Assert That Import

Tip

Assert That Import
Use quick intentions to manage imports and keep your code compiling.
Change Method Signature

Tip

Change Method Signature
Refactor the signature of a method at any time.
Remove Unnecessary Condition

Tip

Remove Unnecessary Condition
Use quick intentions to remove redundant code so it's not cluttering up your codebase.
Convert Concatenation To Template

Tip

Convert Concatenation To Template
Use quick intentions to convert to a template string.
Convert to Expression Body

Tip

Convert to Expression Body
Use quick intentions to convert to use expression body syntax.
Extract Constant

Tip

Extract Constant
Extract a value to a constant.
Extract Field

Tip

Extract Field
Extract code to a field.
Extract Parameter

Tip

Extract Parameter
Extract code to a parameter.
Inline a Method

Tip

Inline a Method
Sometimes inlining a method can improve the readability of your code.
Meaningless Arguments

Tip

Meaningless Arguments
Use quick intentions to remove redundant code so it's not cluttering your codebase.
Replace With var

Tip

Replace With var
Use quick intentions to replace a local variable type with `var`.
Rename an Interface

Tip

Rename an Interface
Renaming in IntelliJ IDEA including comments and texts.
Refactor an Unreachable Statement

Tip

Refactor an Unreachable Statement
Use quick intentions to remove redundant code.
Extract Parameter

Tip

Extract Parameter
Extract code to a parameter in Kotlin.
Refactoring

Part of tutorial

Refactoring
See how the IDE helps you safely refactor code, without breaking existing code.
Rename a File and its References

Tip

Rename a File and its References
Change your mind on a file name, and the IDE makes all the changes for you.
Rename Symbol

Tip

Rename Symbol
Change a variable name, class name, or other symbol, across the project.
Refactoring code in Rider

Part of tutorial

Refactoring code in Rider
Learn how to safely refactor code, without breaking the build.