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

Bug 295864

Summary: Complements for management of operation constraints.
Product: [Modeling] MDT.UML2 Reporter: SUIVANT <regine.suivant>
Component: CoreAssignee: Kenn Hussey <Kenn.Hussey>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P2 Keywords: plan
Version: unspecifiedFlags: Kenn.Hussey: kepler+
Target Milestone: M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard: Community Support

Description SUIVANT CLA 2009-11-23 08:57:57 EST
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: I20090611-1540

Actually only a subset of constraints on an operation are implemented. All these constraints should be managed.

Following behaviors are missing :
1)  According UML specification "An operation can have at most one return parameter". Actually there is no feature preventing to create more than one return parameter. It should be the case.
2) "If this operation has a return parameter, lower equals the value of lower for that parameter; otherwise, lower is not
defined". Actually operations are created with a lower value equal to 1. Lower should not be defined.
3) "If this operation has a return parameter, upper equals the value of upper for that parameter; otherwise, upper is not
defined" Actually operations are created with a upper value equal to 1. Upper should not be defined.
4) "A bodyCondition can only be specified for a query operation". Consequently adding a bodyCondition at an operation should implies that IsQuery was set to true.

Reproducible: Always
Comment 1 Kenn Hussey CLA 2012-06-18 12:09:44 EDT
Regarding 2 and 3, how to you propose that an "undefined" integer value be represented? Primitive types in Java must have a value and so the default multiplicity is currently returned in the case where lower/upper is not defined.

Issue 4 has already been implemented.
Comment 2 Kenn Hussey CLA 2012-06-18 12:16:10 EDT
See also bug 304029.
Comment 3 Kenn Hussey CLA 2012-12-18 14:50:26 EST
The "at most one return" constraint for operations has been implemented. The changes have been committed/pushed to the 'master' branch in git.
Comment 4 Kenn Hussey CLA 2013-01-14 10:54:34 EST
The changes are now available in a Kepler integration build for UML2 4.1.0.