Enforce usage of property default values and a property comment by the method setDefaultPropertyValue
Use LinkedHashMap for propertyComments to preserve insertion order and use that order for writing the properties to the file areProperties.
Updated all currently existing property keys to use setDefaultPropertyValue.
The result is an areProperties file with a nicely formatted content:
# ARE properties, generated at Tue Apr 09 20:47:38 CEST 2019
# Enables/Disables ASAPI port registration for ACS. 1=ACS may connect to ARE through the port specified with the key 'ASAPI.ACSPortNumber'. 0=ACS may not connect to the ARE.
ASAPI.enableACSPortConnection=1
# Enables/Disables ARE autodetection by the ACS. 1=Autodetection enabled, 0=Autodetection disabled
ASAPI.enableAREAutoDetection=1
# Sets the ASAPI port number which is used by the ACS to connect to the ARE.
ASAPI.ACSPortNumber=9090
# Default Linux command to start a browser.
ARE.openURL.cmd.linux=xdg-open
# Default Windows command to start a browser.
ARE.openURL.cmd.windows=explorer
# Default Mac OSX command to start a browser.
ARE.openURL.cmd.macosx=open
# The default font size for the ARE GUI.
ARE.gui.font.size=18
# The background colour of the ARE desktop. Please change the value in the ARE GUI.
background_color=-11435361
# Flag to turn off showing the error dialog. 1=show errors, 0=don't show errors
showErrorDialogs=1
# Enable/Disable if bundles should be tested for being installable on this platform via OSGI
ARE.generate.caches.from.installable.bundles=false
# Hotkey to start model
ARE.hotKey.startModel=VC_F5
# Hotkey to pause model
ARE.hotKey.pauseModel=VC_F6
# Hotkey to stop model
ARE.hotKey.stopModel=VC_F7
# Hotkey to edit model
ARE.hotKey.editModel=VC_F8
# If true the CIM port scanning is performed at start of ARE
CIM.scan.at.start=true
# If true the CIMPortManager starts in raw mode, where COM connections can be used directly without CIM protocol
CIM.mode.raw=false
# The port to use for the REST API.
ARE.webservice.port.REST=8081
# The port to use for websocket communication.
ARE.webservice.port.websocket=8082
# Origins that are allowed to access the ARE REST API. Separate with comma (',').
ARE.REST.allowed.origins=localhost,127.0.0.1,asterics.github.io,asterics-foundation.org
# This timeout in [ms] is used to start/stop a model and do other tasks related to models. If you get a timeout during ARE/model start try to increase the value. Especially on a Raspberry Pi this can be necessary.
ThreadPoolTasks.submitTimeout=20000
This PR improves the AREProperties class:
The result is an areProperties file with a nicely formatted content:
The PR is based on #305 as it is related to the new asterics-docs webpage and new URLs for the AsTeRICS help and WebACS. As a next step I will create a PR to change the URLs for model editing and help according to https://openproject.studyathome.technikum-wien.at/projects/asterics-docs/work_packages/93/activity