IntelliJ IDEA 14.1.0 Help

General Workflows

In this section:

No 'save' button

Time for some really shocking news: IntelliJ IDEA has no save button. Since in IntelliJ IDEA you can undo refactorings and revert changes from the Local History, it makes no sense to ask you to save your changes every time. Thus, more time is saved to focus on development.

Still, it's worth knowing that physical saving to disk is triggered by specific events, including compilation, closing a file, switching focus out of the IDE, etc. You can change this behavior via Settings | Appearance & Behavior | System Settings:

migration_guide_save_settings

No save actions

One of the features you may miss in IntelliJ IDEA as an Eclipse user is save actions, i.e. the actions triggered automatically on save, such as reformatting code, organizing imports, adding missing annotations and the final modifier, etc. Instead, IntelliJ IDEA offers you to run the corresponding actions automatically on commit:

migration_guide_commit

Or manually:

  • Code | Reformat Code (Ctrl+Alt+L)
  • Code | Optimize Imports (Ctrl+Alt+O)
  • Analyze | Code Cleanup

If, for some reason, you can't live without an Eclipse save action, you can install a plugin that imitates Eclipse save actions.

Compilation

So far we've mostly discussed cosmetics. How about more serious things like project compilation? The way IntelliJ IDEA compiles projects is, in fact, different from Eclipse in a number of ways.

Auto-compilation

By default, IntelliJ IDEA doesn't automatically compile projects on saving because normally we don't invoke the save action explicitly in IntelliJ IDEA. If you want to mimic the Eclipse behavior, you can invoke the Make Project action (Ctrl+F9) - it will save the changed files and compile them. For your convenience, you can even reassign the Ctrl+S shortcut to the Make Project action. To enable automatic compilation, navigate to Settings | Build, Execution, Deployment | Compiler and select the Make project automatically option:

migration_guide_complier_settings

Note that automatic compilation in IntelliJ IDEA differs from automatic compilation in Eclipse. In Eclipse it's not fully automatic, as it is triggered by the save action invoked by the user explicitly, whereas in IntelliJ IDEA it is invoked implicitly when you type in the editor.

This is why, even if the Make project automatically option is enabled, IntelliJ IDEA doesn't perform automatic compilation if at least one application is running: it will reload classes in the application implicitly. In this case you can call call Build | Make Project (Ctrl+F9).

Problems tool window

If you don't see the Problems tool window after you've switched from Eclipse to IntelliJ IDEA, make sure that the Make project automatically option is enabled in the Compiler settings. Once you've turned it on, the Problems tool window will appear showing a list of problems that were detected on project compilation:

migration_guide_problems_tool_window

Eclipse compiler

One more surprise may be that, while Eclipse uses its own compiler, IntelliJ IDEA uses the javac compiler bundled with the project JDK. If you must use the Eclipse compiler, navigate to Settings | Build, Execution, Deployment | Compiler | Java Compiler and select it as shown below:

migration_guide_eclipse_compiler

The biggest difference between the Eclipse and javac compilers is that the Eclipse compiler is more tolerant to errors, and sometimes lets you run code that doesn't compile.

In situations when you need to run code with compile errors in IntelliJ IDEA, replace the Make option in your run configuration with Make, no error check:

migration_guide_make_no_error_check

See Also

Last modified: 14 July 2015