Changes for page Java Code Style
Last modified by Thomas Mortagne on 2023/12/06 15:53
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. VincentMassol1 +xwiki:XWiki.ThomasMortagne - Content
-
... ... @@ -34,6 +34,7 @@ 34 34 Download [[codestyle-idea.xml>>https://raw.github.com/xwiki/xwiki-commons/master/xwiki-commons-tools/xwiki-commons-tool-verification-resources/src/main/resources/codestyle-idea.xml]]. 35 35 36 36 Close IntelliJ IDEA. Place the file in your [[IntelliJ IDEA user configuration directory>>http://www.jetbrains.com/idea/webhelp/project-and-ide-settings.html]]: 37 + 37 37 * For example for Windows Vista users of IntelliJ IDEA v6.x, it's in ##C:\Users\username\.IntelliJIdea60\config\codestyles##. Then open IntelliJ IDEA again, select ##File > Project Settings > Project Code Style##, select ##Use per-project code style scheme##, click on ##Import...## and select ##XWiki##. 38 38 * On Mac it's in ##~~/Library/Preferences/IntelliJIdeaXX/codestyles## 39 39 ... ... @@ -174,7 +174,7 @@ 174 174 Trailing whitespace is prohibited except for one case. 175 175 In empty lines in a javadoc comment, a single trailing space character is acceptable but not required. 176 176 177 -{{code language=java}} 178 +{{code language="java"}} 178 178 /** 179 179 * The Constructor. 180 180 * ... ... @@ -210,8 +210,7 @@ 210 210 211 211 = Logging Best Practices = 212 212 213 -* Use SLF4J. Specifically, if your code is in a Component it must get a Logger using the following construct: 214 -((( 214 +* Use SLF4J. Specifically, if your code is in a Component it must get a Logger using the following construct:((( 215 215 {{code language="java"}} 216 216 import org.slf4j.Logger; 217 217 ... ... ... @@ -276,7 +276,7 @@ 276 276 import static <any static imports> 277 277 {{/code}} 278 278 ))) 279 -* The default configuration of Eclipse, and the above code style settings for IntelliJ IDEA will automatically follow these rules, so you usually do not have to take care (Be careful that the default configuration for IntelliJ IDEA is not appropriate).279 +* The above code style settings for IntelliJ IDEA will automatically follow these rules, so you usually do not have to take care (Be careful that the default configuration for IntelliJ IDEA is not appropriate). For Eclipse you should import [[eclipse.importorder>>https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-tools/xwiki-commons-tool-verification-resources/src/main/resources/eclipse.importorder]]. 280 280 281 281 = Equals/HashCode and ToString implementations = 282 282