EGLProperty

EGLProperty identifies functions that get and set the EGL field values. The annotation is useful when you create a widget by authoring a handler, stereotype RUIWidget.

EGL package name

eglx.lang

Example use

If you declare an UpperLimit field for use by EGL developers, you can specify the declaration as follows to indicate use of functions that you coded:

UpperLimit INT { @EGLProperty{ getMethod = getUpper, 
                               setMethod = setUpper };
You can avoid specifying function names if the names of the functions are specified with the word get or set followed by the variable name. For example, if the variable is UpperLimit and a Rich UI Widget type includes functions named getUpperLimit() and setUpperLimit(), you only need to add the annotation as follows:
UpperLimit INT { @EGLProperty{} };
Annotation detail
Record EGLProperty type Annotation
{
   targets = [ElementKind.FieldMbr],
   validationProxy = 
   "org.eclipse.edt.compiler.binding.annotationType.EGLPropertyAnnotationTypeBinding"
} 
   getMethod FunctionMemberRef;
   setMethod FunctionMemberRef;
end
Annotation fields
getMethod
A reference to the get method for the specified variable. The method has no parameters, and its return value is of the same type as the field.
setMethod
A reference to the set method for the specified variable. The method has one parameter that has the same type as the field. By convention the setMethod does not have a return value, but no error condition results if the method returns a value.
Comments

To indicate that a field is read only or write only, you can specify only one of the two annotation fields. If the application tries to read or write to an application field for which the read or write is not supported, an error occurs during compilation.

An annotation that is equivalent to EGLProperty is available for external types; for example, for external-type widgets. For details, see Property annotation.

Compatibility

Table 1. Compatibility
Target Issue
Java Not in use.
JavaScript No issues.