Framework/WorkInProgress/Addon Menu Toolbar Merging
Current state
The current add-on implementation in OpenOffice.org provides the following declarative methods to add commands to the user interface:
- AddonMenu
The commands of an add-on are added as a popup menu to a menu item located below the „Tools“ menu, called „Add-on“. The „Add-on“ menu item is automatically added/removed, if add-on commands are available/not available.
- OfficeMenuBar
The commands of an add-on are added as a separate top-level popup-menu. Every add-on top-level popup menu is added between the „Tools“ and „Window“ popup menu.
- OfficeToolBar
The commands of an add-on are added to a separate add-on toolbar. The user can show/hide and dock/undock this toolbar independently from other toolbars.
- OfficeHelp
A special help menu item is added to the „Help“ popup menu. They are located in their own section between the „Registration...“ and „About OpenOffice/StarOffice“ menu item.
OpenOffice.org does have some ways to integrate add-on commands to the user interface. Although this approach should satisfy most developers, there are some who want to have more freedom where add-on commands should be located. Especially the menu bar is a central user interface element where developers want to have a better control. For example the are some developers who wants to implement alternative save commands, which should be placed in the „File“ menu near the other save methods.
There is an API based solution for developers who wants to integrate their commands to the user interface at defined positions, but it needs some effort to implement it correctly. Another drawback is that every developer has to do this implementation again and again which makes add-on development costly.
Proposed solution
A declarative solution to add commands from add-ons to any position in the menu bar would make development much easier. Therefore the Addon.xcs schema configuration file must be extended to support this requirement. The following chapter describes which elements have to be added to provide a flexible and powerful merge mechanism. The green parts describe the additional definitions.