Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 516734

Summary: Being clear regarding the Java services returning List or Set and not "Collection"
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: florian.barbin, julien.dupont, pierre-charles.david
Version: 4.1.1Keywords: triaged
Target Milestone: 5.1.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/97240
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6eea0a95fbcc795a2a1d52355a6ec217d5ecdb28
https://git.eclipse.org/r/104663
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ea1316115f20fadc0f4a860042ef62c45c2ad6d3
Whiteboard: backport validation services

Description Cedric Brun CLA 2017-05-16 10:08:36 EDT
AQL only supports Sequences and Set as collection types, because of this any Java service defined by the end user which returns a "Collection<SomeEClass>" will be considered as a plain Java type (java.lang.Collection) hence defeating any usefull diagnostic during validation.

We might want to make sure that any services provide "by default" is conform with this constraint or the end user is getting a poor validation bu default.

We might also want to make sure that the documentation is clear regarding the use of List<> and Set<> in the services as the prefered return type in order to get the best validation possible.
Comment 1 Eclipse Genie CLA 2017-05-16 10:17:59 EDT
New Gerrit change created: https://git.eclipse.org/r/97240
Comment 3 Pierre-Charles David CLA 2017-06-12 08:47:09 EDT
Apparently a first patch was merged in M7. Moving to 5.1 to finish the work (reviewing the services shipped with Sirius, and completing the documentation).

Marking as backport candidate, especially if in the end only the documentation is impacted.
Comment 4 Eclipse Genie CLA 2017-09-07 11:07:25 EDT
New Gerrit change created: https://git.eclipse.org/r/104663
Comment 6 Julien Dupont CLA 2017-09-20 08:49:08 EDT
Can not be verified: missing or incomplete reproduction information.
Comment 7 Pierre-Charles David CLA 2017-09-20 10:53:14 EDT
Steps to validate:
1. The documentation on using services from AQL expressions should mention clearly that the generic type "Collection" should not be used in service methods signatures. Only "List" or "Set" should be used to ensure good compatibility with AQL.
2. The standard services we provide in Sirius itself should follow these recommendations. This includes mainly org.eclipse.sirius.ext.emf.edit.EditingDomainServices and the Java services defined in our sample modelers (the 3 "basicfamily" examples).
Comment 8 Pierre-Charles David CLA 2017-11-08 03:37:16 EST
Available in Sirius 5.1.0, see https://wiki.eclipse.org/Sirius/5.1.0.