From 8a9eab46d81001a2d0f0fd10a3862d9e87c2cd46 Mon Sep 17 00:00:00 2001 From: Michael Charfadi Date: Tue, 3 Oct 2023 14:21:56 +0200 Subject: [PATCH] [doc] Contribute a shape to avoid invalid view dsl decriptions elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://github.com/eclipse-sirius/sirius-web/issues/2444 Signed-off-by: Michaƫl Charfadi --- ...ly_valid_view_description_to_renderer.adoc | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/adrs/111_provide_only_valid_view_description_to_renderer.adoc diff --git a/doc/adrs/111_provide_only_valid_view_description_to_renderer.adoc b/doc/adrs/111_provide_only_valid_view_description_to_renderer.adoc new file mode 100644 index 0000000000..f6e80687e8 --- /dev/null +++ b/doc/adrs/111_provide_only_valid_view_description_to_renderer.adoc @@ -0,0 +1,37 @@ += ADR-000 - Adopt Architecture Decision Records + +== 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>` instead of `FormSwitch`. + +`IWidgetConverterProvider#getWidgetConverter` will change to : + +`Switch> getWidgetConverter(AQLInterpreter interpreter, IEditService editService, IObjectService objectService, IFeedbackMessageService feedbackMessageService)`; + +from : + +`Switch 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 +