long time0 = System.currentTimeMillis();
for (int i = 0; i < cache.size(); i++) {
Object obj = cache.get(i);
if (obj instanceof ActionDescriptor) {
try {
ActionDescriptor ad = (ActionDescriptor) obj;
IAction a = ad.getAction();
if (a instanceof IExtendedEditorAction) {
if (((ad.getToolbarPath() != null) || (ad.getToolbarGroup() != null)) && (a instanceof IExtendedEditorActionProxyForDelayLoading)) {
((IExtendedEditorActionProxyForDelayLoading)a).realize();
}
IExtendedEditorAction eea = (IExtendedEditorAction) a;
eea.setActiveExtendedEditor(activeExtendedEditor);
eea.update();
if (eea.isVisible()) {
boolean contributed = contributeToolbarAction(ad, manager, true);
if (debugToolbar && contributed)
System.out.println(getClass().getName() + "#contributeToToolBar() added: " + ad.getId()); //$NON-NLS-1$
}
else {
if (debugToolbar)
System.out.println(getClass().getName() + "#contributeToToolBar(): [skipped] " + ad.getId()); //$NON-NLS-1$
}
}
else {
boolean contributed = contributeToolbarAction(ad, manager, true);
if (debugToolbar && contributed)
System.out.println(getClass().getName() + "#contributeToToolBar() added: " + ad.getId()); //$NON-NLS-1$
}
}
catch (Exception e) {
Logger.logException("contributing to toolbar", e); //$NON-NLS-1$
}