Changes for page Java Code Style

Last modified by Thomas Mortagne on 2023/12/06 15:53

<
From version < 31.1 >
edited by Thomas Mortagne
on 2018/01/24 10:42
To version < 34.1 >
edited by Thomas Mortagne
on 2018/07/30 12:51
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -48,6 +48,8 @@
48 48  * For Linux: in ##/.IntelliJIdeaXX/config.##
49 49  * For Windows: ?
50 50  )))
51 +* If codestyle is not imported automatically, go to ##Other Settings > Default Settings > Java codestyle > Set from (XML) > select file downloaded above.##
52 +* Restart Intellij IDEA.
51 51  
52 52  = Interface best practices =
53 53  
... ... @@ -172,7 +172,7 @@
172 172  /**
173 173   * Something, blah blah...
174 174   *
175 - * @version $Id: $
177 + * @version $Id$
176 176   * @since 1.6M1
177 177   */
178 178  {{/code}}
... ... @@ -462,3 +462,9 @@
462 462  
463 463  See [[Best practices for the Script Module>>extensions:Extension.Script Module#HBestPractices]].
464 464  ~{~{/code}}
467 +
468 += Test classes =
469 +
470 +We often write sometimes complex tools in ##test## classes but those should never be used in ##main## code. While Maven accept it technically it's not the case of Eclipse for example.
471 +
472 +If they really are needed then it's a sign that they should probably move to ##main## or that the test tool manipulating those classes should itself have its classes locate in ##test## (see xwiki-platform-test-page for an example for this use case).

Get Connected