Introduce explicitly empty editor values
What does this MR do?
The main change is to use a three-valued type as common write type for editor (as proposed in #250 (closed)). But instead of having a simple 'Invalid' contructor I added a list of strings to indicate what is wrong with the value in an editor. This can then easily be used to set the hint and toolip attributes when the value changes.
Related issues
This MR:
- closes #427 (closed)
- closes #428 (closed)
- closes #422 (closed)
- closes #250 (closed)
- closes #462 (closed)
Changes to public APIs
The top-level type interface between editors and tasks has been changed.
Previously, the type was Editor v ?v
. Currently it is Editor v (EditorReport v)
. Instead of two values, ?None
and ?Just
this type has three possible values: EmptyEditor
, ValidEditor
and InvalidEditor
which allows discrimination between editors without any data, and editors which are (temporary) invalid during editing.
Author's checklist (required)
See CONTRIBUTING.md for the rationale behind these items:
-
The commit history does not contain merges (use git rebase -i master
if it does) -
Intermediate commits compile (use git rebase -i master
if not) -
Newly added code follows the Platform code style -
Newly added code is documented -
If bugs have been solved, tests have been added -
Appropriate types have been used, especially in APIs -
If efficiency is part of the acceptance criteria of the issue, a benchmark is provided -
A changelog entry has been added if required. See CONTRIBUTING.md