private final void fireActionSetsChanged() {
if (actionSetListeners != null) {
final Object[] listeners = actionSetListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
final IActionSetsListener listener = (IActionSetsListener) listeners[i];
final WorkbenchPage currentPage = getActiveWorkbenchPage();
final IActionSetDescriptor[] newActionSets;
if (currentPage == null) {
newActionSets = null;
} else {
newActionSets = currentPage.getActionSets();
}
final ActionSetsEvent event = new ActionSetsEvent(newActionSets);
listener.actionSetsChanged(event);
}
}
}