JFace Viewer - Implementation of Strategy Pattern
JFace Viewers - Implementation of Strategy Pattern
In the Viewers implementation you would want to customise its behaviour
In addition to customising, you may also want to reuse the same Sorting and Filtering Algorithm in some other viewer also. Therefore eclipse uses Strategy Pattern to implement these features without disturbing the loading and filling of the Viewer.
In Strategy Pattern, the expected behaviour is handled by a seperate object. Therefore the concept of ViewerSorter and ViewerFilter are available in JFace Viewers and these are initialised when required to apply the customised behaviour in a Viewer.