Community
Participate
Working Groups
R2.0 Certain editors have toggle buttons and combo boxes as toolbar contributions. These editors cannot migrate to using action sets and action set / part associations since action sets support only regular actions and drop downs (like the run and debug items). Action sets should be extended to allow toggle buttons and combo boxes. We also need to allow the state of these contributions to correspond with the active part. For example, imagine a wysiwyg editor that has a toolbar button for bold, and a combo box for the current font. There may be multiple editor instances of the same type. When switching between these, the state of the bold button must change to correspond with the current editor's state. Likewise, the contents and selection of the combo should be obtained from the current editor (although, in this case, the list of fonts presumably does not change between editors). For toggle buttons, this can be done by extending the current global action mechanism (i.e. the handler provided by the editor defines the button's selected state). New API would have to be defined to handle combo boxes in a similar fashion. Another approach would be to leave the global action API unchanged, and have the action delegate track the state of the active part itself. For combo boxes, if the delegate could control the combo's list and current selection, then it could track the editor if needed, or update its contents and/or selection itself if not (e.g. the list of fonts would be calculated by the delegate, not the editor). Perhaps the simplest approach would be a compromise: extend the global action mechanism to support toggle buttons, but not combos. Combos would have to do their own retargeting.
We've added support for toggle buttons in action sets. Support for combo box requires too many changes and possible new API - just too much to accomplish for 2.0.1 I've opened bug 22642 to track the combo box request.