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

Bug 327773

Summary: validation of builder's unit parameter is not correct/missing
Product: [Technology] CBI Reporter: Henrik Lindberg <henrik.lindberg>
Component: CBI p2 Repository AggregatorAssignee: CBI Inbox <cbi-inbox>
Status: RESOLVED FIXED QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Henrik Lindberg CLA 2010-10-14 09:29:56 EDT
A builder's first parameter is always "unit" having type '? extends BuildUnit'. There are several required validations and some quirks.

- A builder declared inside a unit should not be allowed to declare the unit parameter as it is implied by its container. (Alternatively, if allowed, it would need to be declared with a compatible type).

- The unit parameter should always be 'final val'

Suggested implementation - derive UnitParameterDeclaration from BParameterDeclaration, and let this class set 'final val' as default values, as well as enforcing that the name is "unit"
Comment 1 Henrik Lindberg CLA 2010-10-14 11:43:31 EDT
First part done, a UnitParameterDeclaration has been introduced that enforces the behavior. It is used in the grammar. A builder with an explicit unit as first parameter must be a UnitParameterDeclaration.
Comment 2 Henrik Lindberg CLA 2010-10-14 11:57:50 EDT
Fixed in revision 1346.
Comment 3 David Williams CLA 2016-09-16 16:03:26 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.
This bug was previously in 'editor' component of EMFT.b3]