*/
private void notifyListeners(final OperationHistoryEvent event) {
if (event.getOperation() instanceof IAdvancedUndoableOperation) {
final IAdvancedUndoableOperation advancedOp = (IAdvancedUndoableOperation) event
.getOperation();
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable exception) {
if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
Tracing
.printTrace(
"OPERATIONHISTORY", //$NON-NLS-1$
"Exception during notification callback " + exception); //$NON-NLS-1$
}
}
public void run() throws Exception {
advancedOp.aboutToNotify(event);
}
});
}
final Object[] listenerArray = listeners.getListeners();
for (int i = 0; i < listenerArray.length; i++) {
final IOperationHistoryListener listener = (IOperationHistoryListener) listenerArray[i];
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable exception) {
if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
Tracing
.printTrace(
"OPERATIONHISTORY", //$NON-NLS-1$