4

I am new to IntelliJ. I have started using it recently and was looking to setup Google Java code style. At present "Default" is selected under Editor -> Code Style -> Scheme.

On clicking settings -> "Import Scheme" I see 2 options: 1) IntelliJ IDEA Code Style XML 2) Eclipse XML Profile.

IntelliJ IDEA Code Style XML => Is this same as Google Code Style?

What is the Default already selected in Scheme?

I was able to setup Google Code Style by downloading it. But need to understand the Default setup in IntelliJ. Any help is highly appreciated as couldn't find any similar question on StackOverFlow.

2 Answers2

4

The default selection is Intellij built-in code style. It's not Sun or Google scheme, it's a different one.

Julieta
  • 407
  • 2
  • 8
  • Thanks for your answer. 1) What is the difference between IntelliJ built-in vs Google Code style? Any link will be helpful to read. 2) If I switch to google code-style now, what will happen to all my existing code which has been developed by using default IntelliJ code-style?... There are thousands of files. – user2220048 May 04 '20 at 04:00
  • 1) I couldn't find a comparison. I'm sorry. 2) Nothing will happen. Your old files won't fit to the new format but nothing will change. In my experience, it will create issues in code reviews because developers tend to reformat the code when adding new code and the diff will be huge only because of the format. If you are not working within a team, then I don't see any problem with switching scheme. – Julieta May 05 '20 at 01:36
0

You can set a certain scheme to be a project level or the IDE level. Project-level is applied only for current project - IDE-level will be used by all the projects. Default is the IDE level scheme.

Check also the documentation about managing code styles in IDE.

Andrey
  • 15,144
  • 25
  • 91
  • 187