38 | | === Guidelines for Plugin Names === |
39 | | * the name of a plugin has to be identical to the project name and the namespace of the plugin (e.g. `HeuristicLab.Data`) |
40 | | * the name of each HeuristicLab 3 plugin starts with "`HeuristicLab.`" |
41 | | * in order to structure plugins hierarchically, sub-namespaces can be used (e.g. `HeuristicLab.Operators` and `HeuristicLab.Operators.Programmable`) |
42 | | * each plugin is represented as a component in Trac |
43 | | * for Trac component names the leading "`HeuristicLab.`" is omitted |
| 38 | === Indentation === |
| 39 | * 2 spaces, no tabs |
| 40 | |
| 41 | === New Lines / Blocks === |
| 42 | * opening braces ("{") are on the same line of the statement which opens the block |
| 43 | * closing braces ("}") are on a new line after the last statement of the block |
| 44 | |
| 45 | === Naming Conventions === |
| 46 | * `CamelCase` for all identifiers |
| 47 | * do not use "_" in identifiers |
| 48 | * do not use "Hungarian Notation" (e.g. `iCount` for an int counter or `dFactor` for a double factor) |
| 49 | * casing |
| 50 | * classes, interfaces, properties, and methods start with an uppercase letter (e.g. `Sheep`, `Weight`, `LookABitSilly`) |
| 51 | * fields, method parameters, and local variables start with a lowercase letter (e.g. `myWeight`, `weight`, `i`) |
| 52 | * names |
| 53 | * interfaces start with an `I` (e.g. `IItem`, `IOperator`) |
| 54 | * abstract base classes end with `Base` (e.g. `ItemBase`, `OperatorBase`) |
| 55 | * the name of a plugin has to be identical to the project name and the namespace of the plugin (e.g. `HeuristicLab.Data`) |
| 56 | * the name of each HeuristicLab 3 plugin starts with "`HeuristicLab.`" |
| 57 | * in order to structure plugins hierarchically, sub-namespaces can be used (e.g. `HeuristicLab.Operators` and `HeuristicLab.Operators.Programmable`) |
| 58 | * each plugin is represented as a component in Trac |
| 59 | * for Trac component names the leading "`HeuristicLab.`" is omitted |
| 60 | |
| 61 | A source code example of well formatted HeuristicLab code is available at SourceExample. |