Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327773 - validation of builder's unit parameter is not correct/missing
Summary: validation of builder's unit parameter is not correct/missing
Status: RESOLVED FIXED
Alias: None
Product: CBI
Classification: Technology
Component: CBI p2 Repository Aggregator (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CBI Inbox CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 09:29 EDT by Henrik Lindberg CLA
Modified: 2016-09-16 16:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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]