Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2460] Reference widget default handler/provider do not need to be @s…
…ervice In #2502 both ReferenceWidgetDefaultCreateElementHandler and ReferenceWidgetDefaultCandidateSearchProvider are defined as Spring Boot services. This means they will always appear in e.g. List<IReferenceWidgetRootCandidateSearchProvider> along with the "normal" (application-provided) one. They need to return false on canHandle() to be ignored when iterating on these lists, which seems wrong as they actually *can* handle all descriptionId. Then we also inject them (a second time) through their concrete type to use them as fallbacks/actual defaults. Do not mark them as @Services. They can (correctly) return true on canHandle. In the few places where we explictly want these default implementations, create them explicitly. ReferenceWidgetDefaultCandidateSearchProvider has no constructor dependency, ReferenceWidgetDefaultCreateElementHandler only needs the IEditService, which we can get easily. Bug: #2460 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr> Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
- Loading branch information
Showing
7 changed files
with
16 additions
and
18 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
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
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
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
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
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
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