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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access