Skip to content

Commit 6170181

Browse files
committed
Re-add "Have auto format working properly in JavaDoc" (and re-order sections)
1 parent e8289fb commit 6170181

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed
99.5 KB
Loading

docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,6 @@ Also, set the "Scan Scope" to "Only Java sources (including tests)".
119119

120120
Save settings by clicking "Apply" and then "OK"
121121

122-
## Run checkstyle
123-
124-
In the lower part of IntelliJ's window, click on "Checkstyle".
125-
In "Rules", change to "JabRef".
126-
Then, you can run a check on all modified files.
127-
128-
{% figure caption:"JabRef's style is active - and we are ready to run a check on all modified files" %}
129-
![JabRef's style is active - and we are ready to run a check on all modified files](guidelines-intellij-checkstyle-window.png)
130-
{% endfigure %}
131-
132122
## Enable proper import cleanup
133123

134124
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
141131

142132
Press "OK".
143133

134+
## Have auto format working properly in JavaDoc
135+
136+
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).
137+
138+
Go to **File > Settings... > Editor > Code Style > Java > JavaDoc**.
139+
140+
At "Other", disable "Wrap at right margin"
141+
142+
{% figure caption:"”Wrap at right margin” disabled" %}
143+
!["Wrap at right margin" disabled](guidelines-intellij-editor-javadoc-do-not-wrap.png)
144+
{% endfigure %}
145+
144146
## Disable too advanced code folding
145147

146148
Go to **File > Settings... > Editor > General > Code Folding**.
@@ -153,6 +155,16 @@ At section "Java", disable "One-line methods".
153155

154156
Press "OK".
155157

158+
## Run checkstyle
159+
160+
In the lower part of IntelliJ's window, click on "Checkstyle".
161+
In "Rules", change to "JabRef".
162+
Then, you can run a check on all modified files.
163+
164+
{% figure caption:"JabRef's style is active - and we are ready to run a check on all modified files" %}
165+
![JabRef's style is active - and we are ready to run a check on all modified files](guidelines-intellij-checkstyle-window.png)
166+
{% endfigure %}
167+
156168
## Final comments
157169

158170
{: .highlight }

0 commit comments

Comments
 (0)