add
Adds the provided configuration to the document. If it's already present in the document, a dialog is displayed and this function returns false. If the user decides via the dialog to use the already existing configuration, `value` will not be added to the document, `onDeletedUsedConfiguration` is called with the existing configuration as parameter and this function returns false.
If the function returns true, the configuration was not in use and was deleted without further ado.
Return
true
if the configuration could be added right away, otherwise false
which indicates that a dialog was displayed, informing the user that an identical configuration is already present in the document.
Parameters
The context to be used if we need to show a dialog.
The MeasurementValueConfiguration to be removed from the document.
callback which is called if `value` matches an already existing configuration and the user decides to use that one.
Adds the `value` configuration to the document's configuration list. No checks are being made, no dialogs displayed.
Parameters
The MeasurementValueConfiguration to be added to the document.
Set to true
if this add operation is supposed to be recorded to the undo stack.