diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-editor-javadoc-do-not-wrap.png b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-editor-javadoc-do-not-wrap.png new file mode 100644 index 00000000000..f8ff03b84e3 Binary files /dev/null and b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-editor-javadoc-do-not-wrap.png differ diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.md b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.md index 64e5a35ef8d..a867de91f8c 100644 --- a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.md +++ b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.md @@ -119,16 +119,6 @@ Also, set the "Scan Scope" to "Only Java sources (including tests)". Save settings by clicking "Apply" and then "OK" -## Run checkstyle - -In the lower part of IntelliJ's window, click on "Checkstyle". -In "Rules", change to "JabRef". -Then, you can run a check on all modified files. - -{% figure caption:"JabRef's style is active - and we are ready to run a check on all modified files" %} -![JabRef's style is active - and we are ready to run a check on all modified files](guidelines-intellij-checkstyle-window.png) -{% endfigure %} - ## Enable proper import cleanup To enable "magic" creation and auto cleanup of imports, go to **File > Settings... > Editor > General > Auto Import**. @@ -141,6 +131,18 @@ There, enable both "Add unambiguous imports on the fly" and "Optimize imports on Press "OK". +## Have auto format working properly in JavaDoc + +To have auto format working properly in the context of JavaDoc and line wrapping, "Wrap at right margin" has to be disabled. Details are found in [IntelliJ issue 240517](https://youtrack.jetbrains.com/issue/IDEA-240517). + +Go to **File > Settings... > Editor > Code Style > Java > JavaDoc**. + +At "Other", disable "Wrap at right margin" + +{% figure caption:"”Wrap at right margin” disabled" %} +!["Wrap at right margin" disabled](guidelines-intellij-editor-javadoc-do-not-wrap.png) +{% endfigure %} + ## Disable too advanced code folding Go to **File > Settings... > Editor > General > Code Folding**. @@ -153,6 +155,16 @@ At section "Java", disable "One-line methods". Press "OK". +## Run checkstyle + +In the lower part of IntelliJ's window, click on "Checkstyle". +In "Rules", change to "JabRef". +Then, you can run a check on all modified files. + +{% figure caption:"JabRef's style is active - and we are ready to run a check on all modified files" %} +![JabRef's style is active - and we are ready to run a check on all modified files](guidelines-intellij-checkstyle-window.png) +{% endfigure %} + ## Final comments {: .highlight }