dart-lang/spark — pull request #249 by devoncarew (2013-11-18 21:11:32+00:00)
Title: Context menu

Partial implementation of context menu support. Essentially, you add actions to an action manager. These actions can be subclasses of `ContextAction`. There's then a utility method on the action manager, that given an object `foo`, can build a list of actions appropriate to that object. You can then use that list of actions to build a context menu.

* adds a ContextAction class, as a subclass of Action. This class can be queried as to whether it applies to a certain context (object), and can indicate which 'category' of actions is belongs in
* Re-works the about and run tests menu items to be actions (and re-shuffles the order of items)
* adds some utility code in actions.dart to build context menus
* plumbs some code into the files view to hook into context menu events

This does not yet display context menus; I need to do some more bootstrap investigation. @dinhviethoa Does the places I've hooked into the files view code look reasonable? @keertip