Retargetable Editor Actions in Eclipse 3.2.x

Developers
2006-11-02
2013-05-15
  • Martijn Rutten
    Martijn Rutten
    2006-11-02

    For zoom actions (Zoom In/Out/Back/Fit) as well as some other actions (Next/Previous Event), we would like to use retargetable editor actions, such that a view (e.g. statistics view) can implement their own behavior for these actions, other than the behavior for the default trace editor. The retargetable actions here help in minimizing the number of menu items, i.e., we will not have a "Zoom In Trace" as well as a "Zoom In Statistics" menu item.

    We tried to implement retargetable editor actions according to the examples in the Eclipse help and readmetool, based on RetargetAction in the TraceEditorActionContributor. So far, we did not manage to get these working for both the IDE and the RCP version including key bindings. See the CVS log for TraceEditorActionContributor for what we tried.

    Google tells me that for Eclipse 3.2 and beyond, actions will become deprecated (not yet in 3.2), and taken over by a vastly differrent implementation, the "command framework".
    For instance (?):
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=36968
    http://wiki.eclipse.org/index.php/Platform_Command_Framework

    This supposedly already is available since in Eclipse 3.2. However, I am having a hard time to figure out how it works. Can anyone show me how to implement the replacement of retargetable editor actions with key bindings in the new command framework?