Describe XSD schema requirement and IDE validation tools (#2629)
Also-by: Florian Hotze <dev@florianhotze.com> Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>pull/2634/head
parent
2c62fcc38e
commit
3cb58eca89
|
|
@ -93,6 +93,16 @@ The rules are defined using the Eclipse Java Formatter definitions. There are pl
|
|||
|
||||
The rules are defined at <https://github.com/openhab/static-code-analysis/tree/main/codestyle/src/main/resources> for the Eclipse WTP formatter, but will have to be manually entered into your IDE.
|
||||
|
||||
#### XML files for Thing-Type Definitions
|
||||
|
||||
Thing-Type definitions must comply with the [thing-description-1.0.0.xsd schema](https://www.openhab.org/schemas/thing-description-1.0.0.xsd).
|
||||
|
||||
To enable automatic schema validation in your IDE you many need to do the following:
|
||||
|
||||
- Eclipse: Download the latest copy of `thing-description-1.0.0.xsd` to your `.lemminx\cache\https\openhab.org\schemas` cache folder.
|
||||
- IntelliJ: Put the cursor into the `xsi:schemeLocation` field of the XML, trigger the <kbd>Alt</kbd><kbd>Enter</kbd> shortcut and select _Fetch external resource_.
|
||||
- Visual Studio Code: Install the XML extension from Red Hat.
|
||||
|
||||
### Java Coding Style
|
||||
|
||||
- The [Java naming conventions](https://java.about.com/od/javasyntax/a/nameconventions.htm) should always be used and are described in detail at the link, a quick summary is:
|
||||
|
|
|
|||
Loading…
Reference in New Issue