@@ -35,21 +35,73 @@ We accept pull requests for fixing issues or adding new features, but you have t
3535Please add javadocs comments to ** all public methods the developer has access to.**
3636Javadocs help developers to see what methods they can/should use and what those do.
3737
38- When adding Javadoc comments, follow this template:
38+ When adding Javadoc comments, follow this Styling choises.
39+
40+ #### Line breaks and paragraphs
41+ When making a new line, start the new line with ` <br> ` and __ don't__ close it.
42+ For paragraphs, keep an empty line in between and then start the new line with a ` <p> ` (Also don't close it)
43+
44+ ** Example** :
3945``` java
4046/**
41- * Short summary of what the method does.
42- * <br >Start new lines with a { @code <br> }
47+ * This is a small summary of some method.
48+ * <br >It uses line breaks like those.
4349 *
44- * @param bar
45- * Set the description in the new line.
50+ * <p >But also new paragraphs are used.
51+ */
52+ ```
53+
54+ #### Links
55+ When linking to other classes or methods, use the full path to it in the ` {@link} ` option.
56+
57+ Bad example: ` {@link BotBlockAPI} `
58+ Good example: ` {@link com.andre601.javabotblockapi.BotBlockAPI BotBlockAPI} `
59+
60+ Note the alternative argument used in the good example.
61+ A special case is used when linking to a method within the same class. In this case just link the method using #.
62+ Example: ` {@link #myMethod} `
63+
64+ ** Note** :
65+ Use the ` <a href=""> ` option to link external pages. When doing so also remember to include ` target="_blank" ` .
66+ A link could look like this: ` <a href="https://google.com" target="_blank">Google it!</a> ` (You have to close it.)
67+
68+ #### param styling
69+ When the method has parameters, you have to set a description with the ` @param ` option.
70+ Note that the description has to be on a new line.
71+
72+ ** Example** :
73+ ``` java
74+ /**
75+ * @param foo
76+ * The param description.
77+ */
78+ ```
79+
80+ #### Since
81+ When adding new methods to the API, will you need to add a ` @since ` annotation at the end containing the new version.
82+ Usually do only big, breaking changes increase the minor number (` v{major}.{minor}.{build} ` ) so usually you only increase the build.
83+
84+ Please do NOT edit any already existing ` @since ` annotation.
85+
86+ #### Other Styling
87+ Please make sure that all text is on the same vertical line (block).
88+ This means that when f.e. a ` @return ` is used, that you have to use two spaces after ` @param ` instead of one.
89+
90+ #### Example
91+ Here is an example of a method with all parts:
92+ ``` java
93+ /**
94+ * Adds "Bar" to the provided text.
95+ *
96+ * @param foo
97+ * The text that should get "Bar" added to it.
4698 *
47- * @return What it returns. (Note to keep the param name, description and return value on same vertical line)
99+ * @return The provided String with "Bar" added to it.
48100 *
49- * @since vNew.version.here
101+ * @since v1.0.0
50102 */
51- public String myMethod (String bar ){
52- return " foo" + bar ;
103+ public String getFooBar (String foo ){
104+ return foo + " Bar " ;
53105}
54106```
55107
0 commit comments