Community
Participate
Working Groups
Currently the listener interfaces from SWT (SelectionListener, ControlListener, etc.) do not implement Serializable. This makes things harder for applications that require their sessions to be serializable in order to provide transparent session failover. Each listener must be made Serializable in the application code. Unless the application programmer provides his/her own _serializable listeners_, anonymous listeners aren't possible any more. Instead of writing anonymous classes like so: button.addSelectionListener( new SelectionListener() { ... } ); application programmers would have to create a new interface: interface SerializableSelectionListener extends SelectionListener, Serializable { } and then write button.addSelectionListener( new SerializableSelectionListener() { ... } ); From a clustered-application-programmers point of view it would be convenient if RWT would provide serializable listeners out of the box. Those that aren't interested in serializable listeners would get compiler warnings like The serializable class XXX does not declare a static final serialVersionUID field of type long if they stay with the default compiler settings. After several discussions I tend to take the 'RWT comes with serializable listeners' approach. Any other opinions?
org.eclipse.swt.widgets.Listener now implements Serializable
SWTEventListener now implements Serializable Sorry for the compiler warnings, they will be fixed with bug 351641.