title: In Eclipse, how to find the control added to the toolbar by id?
body: <p>I have added a control to eclipse as below</p>
  
  <pre><code>&lt;extension point="org.eclipse.ui.menus"&gt;
  &lt;menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar"&gt;
   &lt;toolbar id="my.toolbar"&gt;
     &lt;control
          class="myplugin.debugger.toolbaritem.DebugDayMenu"
          id="my.yearmenu"&gt;
     &lt;/control&gt;
  </code></pre>
  
  <p>I also created a class DebugDayMenu</p>
  
  <pre><code>public class DebugDayMenu extends WorkbenchWindowControlContribution{...
  </code></pre>
  
  <p>I now want to access this control in another place but when I try to do so using this code below, it results in a class cast exception</p>
  
  <pre><code>IContributionItem toolbar = coolBarManager.find("my.toolbar");
  IToolBarManager toolbarManager=((ToolBarContributionItem2)toolbar).getToolBarManager();
  WorkbenchWindowControlContribution dayMenu= (WorkbenchWindowControlContribution) toolbarManager.find("my.yearmenu");
  </code></pre>
  
  <p>dayMenu is instanceof DynamicToolBarContributionItem and NOT  WorkbenchWindowControlContribution ? Furthermore the control is embedded in a private field in DynamicToolBarContributionItem with no public accessor method</p>
  
  <p>Is there a better way to do this or am I misunderstanding something?</p>