A context menu can be added to the TimeZoneTableView
class and respond to it dynamically in the view's creation. The typical pattern for Eclipse 3 applications is to create a hookContextMenu()
method, which is used to wire up the context menu operation with displaying the menu. A default implementation can be seen by creating an example view, or one can be created from first principles.
Eclipse menus are managed by a MenuManager
. This is a specialized subclass of a more general ContributionManager
, which looks after a dynamic set of contributions that can be made from other sources. When the menu manager is connected to a control, it responds in the standard ways for the platform for showing the menu (typically a context-sensitive click or short key). Menus can also be displayed in other locations, such as a view's or the workspace's coolbar (toolbar). The same MenuManager
approach works in these different locations.
Open the
TimeZoneTableView
class and...