Time for action – creating a tree viewer

As with the previous chapter, a new TimeZoneTreeView class will be created using the plugin.xml editor, as an E4 view. This will show time zones, organized hierarchically by region.

  1. Right-click on the com.packtpub.e4.clock.ui project and navigate to Plug-in Tools | Open Manifest if it's not open already.
  2. Open the Extensions tab and go to the org.eclipse.ui.views entry. Right-click on this, navigate to New | e4view, and fill in the following:
    1. ID: com.packtpub.e4.clock.ui.views.TimeZoneTreeView
    2. Name: Time Zone Tree View
    3. Class: com.packtpub.e4.clock.ui.views.TimeZoneTreeView
    4. Category: com.packtpub.e4.clock.ui
    5. Icon: icons/sample.gif
  3. An entry is created in the plugin.xml file that looks like:
    <e4view category="com.packtpub.e4.clock.ui" ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.