Okay, so eclipse creates that ApplicationActionBarAdvisor class that extends ActionBarAdvisor.
Now in my plugin.xml file I define a bunch of buttons for the toolbar. And they show up when the program starts.
But when I try to get the list of contribution items in the ApplicationActionBarAdvisor class it always returns zero. At what point are the toolbar contributions from plugin.xml loaded? When will the actionbaradvisor class return a list of items greater than 0?
public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
// Actions - important to allocate these only in makeActions, and then use
// them
// in the fill methods. This ensures that the actions aren't recreated
// when fillActionBars is called with FILL_PROXY.
public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
super(configurer);
System.err.println("Number items in coolbar " + this.getActionBarConfigurer().getCoolBarManager().getItems().length);
}
@Override
public void fillCoolBar(ICoolBarManager coolBarManager){
System.err.println("Number items in coolbar " + coolBarManager.getItems().length);
}
}