O'Reilly logo

Contributing to Eclipse: Principles, Patterns, and Plug-Ins by Kent Beck, Erich Gamma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required