Time for action – filtering items in a viewer

Another common feature of viewers is filtering. This is used both when performing a manual search, as well as for filtering specific aspects from a view. Quite often, the filtering is connected to the view's menu, which is the drop-down triangle on the top right of the view, using a common name such as Filters. The ViewerFilter class provides a filtering method, confusingly called select (there are some filter methods, but these are used to filter the entire array; the select is used to determine if a specific element is shown or not).

  1. Create a class TimeZoneViewerFilter in the com.packtpub.e4.clock.ui.internal package, which extends ViewerFilter. It should take a String pattern in the constructor, ...

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.