title: eclipse listener for main menu bar selections
body: <p>i am trying to capture user selections from the menu bar , for example if the user pressed File in the menu, my plug-in gonna print "File pressed". 
  i figured out how to listen to view selections by IselectionService , but still has no clue how to do it with the main menu bars(or toolbars).</p>
  
  <p>thanx for help </p>
  
  <hr>
  
  <p>More details :</p>
  
  <p>I gonna explain my problem a little bit more precisely :<br>
  I would like capture top-level menus actions and toolbar, the problem is I really don't know how to create and attach the listener.<br>
  Here is the <code>ISelectionListener</code> of the plugin.<br>
  My purpose is to listen to the workbench top-level menu selections and toolbar.<br>
  Thanx for help</p>
  
  <pre><code>// the listener we register with the selection service 
  private ISelectionListener listener = new ISelectionListener() {
    public void selectionChanged(IWorkbenchPart sourcepart, ISelection selection) {
      // we ignore our own selections
      if (sourcepart != SelectionView.this) {
        showSelection(sourcepart, selection);
      }
    }
  };
  ...
  ...
  public void createPartControl(Composite parent) {
    ...
    getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);
  </code></pre>
  
  <p>P.S : Most what I found about menu listener were SWT stuff for some view or windows I had created, thats not what I meant, I need listener to the main top level menu and toolbars in eclipse workbench.</p>