Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #356388 +++ i int{@Property{}}; I should get a validation error if my handler containing such a global field does not have a "getI" or "setI" function. Currently there is no validation error when default accessors are expected but missing from the application. Note that this only needs to happen when the user doesn't specify either of the accessors. If they specify one but not the other, then that means it's a read only or write only field and a default is not used for the omitted property.
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