Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
e907bf0c
Commit
e907bf0c
authored
Jan 07, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setup instructions for in IntelliJ IDEA
Closes gh-15634
parent
2153a752
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
0 deletions
+157
-0
CONTRIBUTING.adoc
CONTRIBUTING.adoc
+29
-0
codeStyleConfig.xml
idea/codeStyleConfig.xml
+128
-0
No files found.
CONTRIBUTING.adoc
View file @
e907bf0c
...
...
@@ -192,6 +192,35 @@ need to import the root `spring-boot` pom and the `spring-boot-samples` pom sepa
=== Importing into IntelliJ IDEA
To open the project in IntelliJ IDEA, select "`File`" -> "`Open`" and then click on the
root `pom.xml`.
==== Install the Spring Formatter plugin
If you haven't done so, install the formatter plugin so that proper formatting rules are
applied automatically when you reformat code in the IDE.
* Download the latest https://search.maven.org/search?q=g:io.spring.javaformat%20AND%20a:spring-javaformat-intellij-plugin[Intellij IDEA plugin]
* Select "`IntelliJ IDEA`" -> "`Preferences`".
* Select "`Plugins`"
* Select the wheel and "`Install Plugin from Disk...`"
* Select the jar file you've downloaded
==== Import additional code style
The formatter does not cover all rules (such as order of imports) and an additional file
needs to be added.
* Select "`IntelliJ IDEA`" -> "`Preferences`".
* Select "`Editor`" -> "`Code Style`".
* Select the wheel and "`Import Scheme`" -> "`IntelliJ IDEA code style XML`".
* Select `idea/codeStyleConfig.xml` from this repository
=== Importing into Other IDEs
Maven is well supported by most Java IDEs. Refer to your vendor documentation.
...
...
idea/codeStyleConfig.xml
0 → 100644
View file @
e907bf0c
<code_scheme
name=
"SpringBoot"
version=
"173"
>
<option
name=
"AUTODETECT_INDENTS"
value=
"false"
/>
<option
name=
"OTHER_INDENT_OPTIONS"
>
<value>
<option
name=
"USE_TAB_CHARACTER"
value=
"true"
/>
</value>
</option>
<option
name=
"CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"50"
/>
<option
name=
"NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"500"
/>
<option
name=
"IMPORT_LAYOUT_TABLE"
>
<value>
<package
name=
"java"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
"javax"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
"org.springframework"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"true"
/>
</value>
</option>
<option
name=
"RIGHT_MARGIN"
value=
"90"
/>
<option
name=
"ENABLE_JAVADOC_FORMATTING"
value=
"false"
/>
<option
name=
"JD_ALIGN_PARAM_COMMENTS"
value=
"false"
/>
<option
name=
"JD_ALIGN_EXCEPTION_COMMENTS"
value=
"false"
/>
<option
name=
"JD_KEEP_EMPTY_LINES"
value=
"false"
/>
<GroovyCodeStyleSettings>
<option
name=
"CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"500"
/>
<option
name=
"NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"500"
/>
<option
name=
"IMPORT_LAYOUT_TABLE"
>
<value>
<emptyLine/>
<package
name=
"javax"
withSubpackages=
"true"
static=
"false"
/>
<package
name=
"java"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
"org.springframework"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"true"
/>
</value>
</option>
</GroovyCodeStyleSettings>
<JavaCodeStyleSettings>
<option
name=
"CLASS_NAMES_IN_JAVADOC"
value=
"3"
/>
<option
name=
"INSERT_INNER_CLASS_IMPORTS"
value=
"true"
/>
<option
name=
"CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"50"
/>
<option
name=
"NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND"
value=
"500"
/>
<option
name=
"PACKAGES_TO_USE_IMPORT_ON_DEMAND"
>
<value/>
</option>
<option
name=
"IMPORT_LAYOUT_TABLE"
>
<value>
<package
name=
"java"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
"javax"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
"org.springframework"
withSubpackages=
"true"
static=
"false"
/>
<emptyLine/>
<package
name=
""
withSubpackages=
"true"
static=
"true"
/>
</value>
</option>
<option
name=
"ENABLE_JAVADOC_FORMATTING"
value=
"false"
/>
<option
name=
"JD_ALIGN_PARAM_COMMENTS"
value=
"false"
/>
<option
name=
"JD_ALIGN_EXCEPTION_COMMENTS"
value=
"false"
/>
<option
name=
"JD_KEEP_INVALID_TAGS"
value=
"false"
/>
<option
name=
"JD_KEEP_EMPTY_LINES"
value=
"false"
/>
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option
name=
"PACKAGES_TO_USE_STAR_IMPORTS"
>
<value>
<package
name=
"java.util"
withSubpackages=
"false"
static=
"false"
/>
<package
name=
"kotlinx.android.synthetic"
withSubpackages=
"false"
static=
"false"
/>
</value>
</option>
<option
name=
"NAME_COUNT_TO_USE_STAR_IMPORT"
value=
"20"
/>
<option
name=
"NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS"
value=
"20"
/>
</JetCodeStyleSettings>
<XML>
<option
name=
"XML_LEGACY_SETTINGS_IMPORTED"
value=
"true"
/>
</XML>
<editorconfig>
<option
name=
"ENABLED"
value=
"false"
/>
</editorconfig>
<codeStyleSettings
language=
"Groovy"
>
<indentOptions>
<option
name=
"USE_TAB_CHARACTER"
value=
"true"
/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings
language=
"JAVA"
>
<option
name=
"KEEP_BLANK_LINES_BEFORE_RBRACE"
value=
"1"
/>
<option
name=
"BLANK_LINES_AROUND_FIELD"
value=
"1"
/>
<option
name=
"BLANK_LINES_AROUND_FIELD_IN_INTERFACE"
value=
"1"
/>
<option
name=
"ELSE_ON_NEW_LINE"
value=
"true"
/>
<option
name=
"CATCH_ON_NEW_LINE"
value=
"true"
/>
<option
name=
"FINALLY_ON_NEW_LINE"
value=
"true"
/>
<option
name=
"ALIGN_MULTILINE_PARAMETERS"
value=
"false"
/>
<option
name=
"SPACE_WITHIN_ARRAY_INITIALIZER_BRACES"
value=
"true"
/>
<option
name=
"SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE"
value=
"true"
/>
<option
name=
"BINARY_OPERATION_SIGN_ON_NEXT_LINE"
value=
"true"
/>
<option
name=
"KEEP_SIMPLE_CLASSES_IN_ONE_LINE"
value=
"true"
/>
<option
name=
"KEEP_MULTIPLE_EXPRESSIONS_IN_ONE_LINE"
value=
"true"
/>
<indentOptions>
<option
name=
"USE_TAB_CHARACTER"
value=
"true"
/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings
language=
"JSON"
>
<indentOptions>
<option
name=
"TAB_SIZE"
value=
"2"
/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings
language=
"XML"
>
<indentOptions>
<option
name=
"USE_TAB_CHARACTER"
value=
"true"
/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings
language=
"kotlin"
>
<indentOptions>
<option
name=
"USE_TAB_CHARACTER"
value=
"true"
/>
</indentOptions>
</codeStyleSettings>
</code_scheme>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment