Changes between Version 5 and Version 6 of BASE_MENUS_R0
- Timestamp:
- 12/31/08 22:11:49 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BASE_MENUS_R0
v5 v6 9 9 == Overview == 10 10 11 Create a menu library that allows plugins to add menus and menu items. The library should have an extension point that allows a plugin to register itself and be queried for menus and menu items. 11 Create a menu library that allows plugins to add menus and menu items. The library should have an extension point that allows a plugin to register itself and be queried for menus and menu items. Currently menus are implemented in org.sophie2.main.view.menus and the main menubar is hard coded to specific menus. This should change because plugins need to be able to add their own menus or menu items. 12 13 The idea of this task is to decentralize menus. A library that lets someone use an extension point to register a menu item in a menu achieves this. Both the menus and the menu items need to be able to supply some hint as to where the new menu and menu item should be sorted into the existing menubar/menu. 12 14 13 15 == Task requirements == 14 16 15 * Create a module for menubars, menus and menu items 16 * Allow for extension point so plugins can register menu items in menus 17 * Create a module for menubars, menus and menu items. Ask milo about the name for this module. 18 * Determine what should go in org.sophie2.func.file (if anything) and what should go in org.sophie2.main.view. 19 * Add extension point so plugins can register menu items in menus 17 20 * Menubars should sort menus by the sort key 18 * Refactor menu creation code in org.sophie2.main.view.menus [wiki:APP_BASIC_MENUS_R0]19 21 * Document the new library 20 22 21 23 == Task result == 22 24 23 The result shall be code and unit tests25 The result shall be code 24 26 25 27 == Implementation idea == 26 28 27 * Menus mighthave a sort key that allows menus to be sorted within a menu bar28 * Menu items mighthave a sort key that allows menu items to be sorted within a menu bar29 * Menus should have a sort key that allows menus to be sorted within a menu bar 30 * Menu items should have a sort key that allows menu items to be sorted within a menu bar 29 31 * The sort key could be a simple string. This will allow us to define a protocol for sorting in an initial pass of the code, and make the menu organization more sophisticated later. 32 * menu items need shortcuts, but those are platform specific (control-C to copy on windows, command-c to copy on the Mac) (maybe swing handles this?) 30 33 31 34 == Related == … … 35 38 36 39 * Show the documentation for the menu library 37 * Show how to create a menu, menu item and register them through the extension point 40 * Show how to create a menu, menu item and register them through the extension point. 41 * Demo along with [wiki:APP_BASIC_MENUS_R0] to show how this works. 38 42 39 43 = Design =