title: Eclipse plugin / RCP : Showing menu via handler
body: <p>I'm looking to create a toolbar with a drop-down menu largely identical to Eclipse's &quot;Open Console&quot; button in the console view.</p>
  <p>I can do this by programmatically adding actions (which is what the Console View does), however I'm looking to do this via commands &amp; handlers in plugin.xml.</p>
  <p>The instructions at <a href="https://wiki.eclipse.org/Menu_Contributions/Dropdown_Command" rel="nofollow noreferrer">https://wiki.eclipse.org/Menu_Contributions/Dropdown_Command</a> are <em>extremely</em> good, however I'm looking to show the drop-down menu when the button itself is clicked (I.E.: clicking the button behaves the same as clicking the drop-down menu triangle to the right of the button). Again: identical to how the &quot;Open Console&quot; button works.</p>
  <p>However I've no clue how to do this in &quot;plugin.xml land&quot;. I've tried the following in the handler:</p>
  <pre><code>@Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
      Event e = (Event) event.getTrigger();
      ToolBar t = ((ToolItem) e.widget).getParent();
      Menu m = t.getMenu();
      m.setVisible(true);
  [...]
  </code></pre>
  <p>... however <code>t.getMenu()</code> returns a null ...</p>