Chapter 3 – Creating JFace Viewers

Understanding JFace

1. getImage() is called to determine what image to show for an entry, while getText() is used to determine the text value of an entry.

2. The hasChildren() method is used to determine whether or not an element is shown with an expandable element, and getChildren() is used to calculate a list of children.

3. An ImageRegistry is used to share images between plug-ins or different views in plug-ins, with a means of clearing up the resources when the view is disposed.

4. Entries can be styled with an IStyledLabelProvider.

Understanding sorting and filters

1. Specifying a ViewerComparator can allow elements to be sorted in a different order other than the default one.

2. The select() method is used to ...

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.