Custom Code Style Settings using xml file like in eclipse

Answered

I have an xml file of my own code formatting style rules created using eclipse. Followings are the example entries in that
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Aristocrat_java_formatter" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>

</profile>
</profiles>

 

How I can use it in intelliJ ? I tried it using code styles -> java -> manage -> import, but there is only one predefined option.

2 comments
Comment actions Permalink

You've probably disabled Eclipse Integration plug-in (http://www.jetbrains.com/idea/webhelp/enabling-and-disabling-plugins.html) which provides an additional option for this dialog:

Another option is to use Eclipse Code Formatter plug-in (https://plugins.jetbrains.com/plugin/6546?pr=idea) which will replace built-in code formatter and provide exactly the same results as Eclipse.

0
Comment actions Permalink

Thanks a lot !! It works(Second Option)

0

Please sign in to leave a comment.