How to import .XML code style into IntelliJ Idea 15

b3000 picture b3000 · Jan 22, 2016 · Viewed 21.3k times · Source

I want to use a specific code style in my editor defined in an XML file, which looks something like this:

<code_scheme name="CustomStyleName">
<option name="JAVA_INDENT_OPTIONS">
<value>
...

How is it possible to import this style into IntelliJ Idea. When I go to Preferences->Editor->Code Style->Manage it is only possible to import an Eclipse XML Profile.

screenshot of the import dialog

Answer

hitz picture hitz · Jan 22, 2016

If your XML is previously exported Intellij you can simply do:

File > Import Settings > select your xml

If its custom defined, one you can try copying your xml to intellij config directory:

config/codestyles

Assuming your xml is in format intellij can understand, it will then show up in

Code Styles > Manage

If your XML is in different format, try to match tags with one of pre-defined styles(also XML)