| Summary: | collectNested returns Bag rather than Sequence for ordered collection | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Ed Willink <ed> |
| Component: | Documentation | Assignee: | Project Inbox <accceleo-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | laurent.goubet |
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=490982 | ||
| Whiteboard: | |||
|
Description
Ed Willink
Correction: It's just the documentation that's wrong. [My source was a Set rather than an OrderedSet.] The documentation as a whole needs a good maintenance, thanks for highlighting this one. You may want to leverage the Acceleo transformation that generates the Indigo OCL Standard Library documentation from the candidate OMG OCL Standard Library model. I should get time in the next couple of months to provide OCL 2.4 models and resolutions at which point the Acceleo templates to auto-gen the specification should be re-useab;e for other purposes. The documentation of Acceleo mentions that "The type of the resulting collection depends on the type of self." However, the first line of the documentation for the content assist indeed mentions that the signature is "Bag(T2) collectNested(OclExpression expr)" even on an OrderedSet self. This is due to the oclstdlib incorrectly describing the operation. org.eclipse.ocl.ecore/model/oclstdlib.ecore has "OrderedSet(T)_Class.collectNested(OclExpression) : Bag(T2)". The EvaluationVisitorImpl, however, correctly uses an ArrayList (Sequence) for the result of this call. (In reply to Laurent Goubet from comment #2) > The documentation as a whole needs a good maintenance, thanks for > highlighting this one. The Acceleo issue to be addressed. Returning this Bug to Acceleo. (In reply to Laurent Goubet from comment #4) > This is due to the oclstdlib incorrectly describing the operation. An OCL bug to be addressed. Bug 490982 raised. |