| Summary: | No validation error when missing getter and setter for @Property | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Brian Svihovec <svihovec> |
| Component: | EDT | Assignee: | fahua jin <jinfahua> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jspadea, pharmon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 356388 | ||
| Bug Blocks: | 363656, 368577 | ||
|
Description
Brian Svihovec
I have updated the validators and added a validation proxy for @Property. I do not see any validation errors for
i int{@Property{}};
in a Basic project using EDT Version: 0.8.0.v201203300902-1DV-FjuJ6QMOF4nynxT88h8G.
I tried a Program and a Handler.
After discussing with Brian, I think that @Property should only be allowed on fields in an ExternalType. The purpose of @Property is to provide the same type of information to the generators about how to access a field, without the validation rules that check for the getter and setter (since there is no way to know if the getter/setter is defined in the ET). To keep these 2 annotations separate, we should prevent @Property from being used except on fields in an ET. We can still allow @EGLProperty on ET fields, however. This is in case someone wants the added validation that this annotation provides Rocky, Just need to add a validator that prevents the use of @Property on fields that are not defined in an externaltype. Just look at how EGLPropertyValidator for an example of how to do this (this validator is invoked when any field specifies the @EGLProperty annotation). We should probably wait until the validation extensibility work is complete before writing this validator. Setting the target milestone to Future for bugs that won't be addressed in 0.8.2. http://git.eclipse.org/c/edt/org.eclipse.edt.git/commit/?id=994f695d1e23d82b1207b26ea11c0ec746dc4b27 @Property is now only allowed on fields inside external types |