-
Enhancement
-
Resolution: Fixed
-
P4
-
7u6
Every event needs to define its ANY type.
For instance, there is ActionEvent, which has only one type - ACTION. The problem is that the ActionEvent extends from Event and inherits its (static) ANY type. So code completion offers registering handler to ActionEvent.ANY, which is a correct expression but will get all existing events because it is in fact Event.ANY.
So the inherited ANY type needs to be covered by a more specific ANY type. For the single-type events it should be OK to let the ANY type reference to the single actual type, like
public static final EventType<ActionEvent> ANY = ACTION;
For instance, there is ActionEvent, which has only one type - ACTION. The problem is that the ActionEvent extends from Event and inherits its (static) ANY type. So code completion offers registering handler to ActionEvent.ANY, which is a correct expression but will get all existing events because it is in fact Event.ANY.
So the inherited ANY type needs to be covered by a more specific ANY type. For the single-type events it should be OK to let the ANY type reference to the single actual type, like
public static final EventType<ActionEvent> ANY = ACTION;