Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] Contribute an ADR to avoid issues with invalid view decriptions…
… elements Bug: #2444 Signed-off-by: Michaël Charfadi <michael.charfadi@obeosoft.com>
- Loading branch information
1 parent
7ec070c
commit 7be8b74
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
doc/adrs/111_provide_only_valid_view_descriptions_to_the_renderer.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
= ADR-111 - Provide only valid view descriptions to the renderer | ||
|
||
== Context | ||
|
||
Some rendered components can have an invalid description. | ||
For example a reference widget component without a valid `Reference Name Expression`. | ||
|
||
This can provoke unexpected results. | ||
We want to avoid converting view dsl elements to programmatic elements if they have an invalid description. | ||
|
||
== Decision | ||
|
||
Only the `sirius-components-view-emf` package will be impacted. | ||
|
||
The class `ViewFormDescriptionConverterSwitch.java` will extends extends `FormSwitch<Optional<AbstractControlDescription>>` instead of `FormSwitch<AbstractControlDescription>`. | ||
|
||
`IWidgetConverterProvider#getWidgetConverter` will change to: | ||
|
||
`Switch<Optional<AbstractWidgetDescription>> getWidgetConverter(AQLInterpreter interpreter, IEditService editService, IObjectService objectService, IFeedbackMessageService feedbackMessageService)`; | ||
|
||
from: | ||
`Switch<AbstractWidgetDescription> getWidgetConverter(AQLInterpreter interpreter, IEditService editService, IObjectService objectService, IFeedbackMessageService feedbackMessageService)`; | ||
|
||
`ReferenceWidgetDescriptionConverterSwitch#caseReferenceWidgetDescription` will return an empty optional if the widget description is invalid. | ||
|
||
|
||
We will also log all invalid descriptions. | ||
|
||
== Status | ||
|
||
draft | ||
|
||
== Consequences | ||
|
||
This will change currently used API that will need to be documented. | ||
|
||
== References | ||
|