[JAVA] Eclipse formatter settings

Eclipse formatter settings

What thing?

This is the Eclipse formatter setting (for Java) that I use as a template.

I think every project has something like a coding standard.

However, unfortunately, although it is described as a specification, there are not a few things that are not automatically checked.

When that happens, in most cases the coding conventions will not be followed, and you will have to manually check at the time of review, which will be quite a pain.

In case of such a difficult time, this formatter setting is modified according to the coding standard and distributed to the team.

How to use?

  1. Open the properties from the Eclipse project.

  2. Select Java Code Style-Formatter. フォーマッター設定.JPG

  3. Press the "Import" button to load the formatter settings XML file. Keep the files you are using. https://github.com/koma01102003/Eclipse-Template-Settings

  4. Select the imported XML file from the pull-down menu and press the "Edit button" to make detailed settings. フォーマッター設定2.JPG

  5. After that, right-click the project or java source and select "Source"-"Format" to format it neatly.

What should I be careful about?

There are times when you can't set it, but I think you can do most of the things by setting it.

Also, in the case of a method with many arguments, it may be easier for people to see. In such cases, we do not use formatters to prioritize visibility.

Recommended Posts

Eclipse formatter settings
[OpenCV3.2.0] Eclipse (Java) settings (for Mac)
RuboCop settings
Eclipse error
Ruby settings 1
Eclipse --Springboot
Java management and STS (Eclipse) build path settings