Home > coding, dev-tools, eclipse, intellij, java > Configure Intellij to use default Eclipse Java import layout

Configure Intellij to use default Eclipse Java import layout

Eclipse and Intellij use different default layouts of Java imports. If used on the same project, Eclipse’s “Organize Imports” will compete with Intellij’s “Optimize Imports“.

To avoid distracting back-and-forth code changes, Intellij can be configured to match the default Eclipse behavior:

Go to File – Settings – Editor – Code Style – Java – Imports tab

Prevent on-demand imports (i.e. wildcards) by settings high count limits:
intellij-java-imports-no-wildcards

Define the imports layout (i.e. grouping and order) like this:
intellij-java-imports-layout

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: