Chapter 6. Implementing the Menu Item Behavior

In this chapter, we will see

  • How the workbench lazily creates the Action used in our plug-in

  • How an Action operates

  • Plug-in dependency and build classpath management

The class we are about to define will take a selected type, run the tests in that type, and display the results.

One of the consequences of the Lazy Loading Rule is that the logic of the action won't be available when the user first sees the action in the user interface. All that exists before our action has been selected is a generic proxy for the menu item's action. The generic proxy action in the workbench (an example of the Proxy pattern) uses the information in the manifest to decide whether an item should appear for a particular selection, ...

Get Contributing to Eclipse: Principles, Patterns, and Plug-Ins now with the O’Reilly learning platform.

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