Chapter 14. Menu Contributions

In this chapter, we'll see how to create a context menu that accepts contributions.

Here's the scenario. We've written and run a test. It fails. We change code in various files to try to make the test pass. We'd like to rerun the failing tests without having to navigate back to our test class.

The view is still sitting there on the screen, balefully glaring red. We could add a pop-up menu to the view containing (at the moment) a single menu item to rerun the failing test. There are several other possible user interfaces, but this is one that will allow us to demonstrate implementing a contribution-enabled menu, so we'll go with this one at the moment. In any case, the UI is about to take a dramatic right-angle turn, ...

Get Contributing to Eclipse: Principles, Patterns, and Plug-Ins 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.