comparison dwtx/core/commands/operations/DefaultOperationHistory.d @ 39:644f1334b451

fix anon classes
author Frank Benoit <benoit@tionex.de>
date Tue, 08 Apr 2008 22:05:42 +0200
parents 6518c18a01f7
children da5ad8eedf5d
comparison
equal deleted inserted replaced
38:c884a1ab6db3 39:644f1334b451
915 * Notify listeners of an operation event. 915 * Notify listeners of an operation event.
916 */ 916 */
917 private void notifyListeners(OperationHistoryEvent event) { 917 private void notifyListeners(OperationHistoryEvent event) {
918 if ( auto e = cast(IAdvancedUndoableOperation)event.getOperation() ) { 918 if ( auto e = cast(IAdvancedUndoableOperation)event.getOperation() ) {
919 IAdvancedUndoableOperation advancedOp = e; 919 IAdvancedUndoableOperation advancedOp = e;
920 SafeRunner.run(new class() ISafeRunnable { 920 SafeRunner.run(new class(advancedOp) ISafeRunnable {
921 IAdvancedUndoableOperation advancedOp_; 921 IAdvancedUndoableOperation advancedOp_;
922 this(){ advancedOp_=advancedOp;} 922 this(IAdvancedUndoableOperation a){ advancedOp_=a;}
923 public void handleException(Exception exception) { 923 public void handleException(Exception exception) {
924 if (DEBUG_OPERATION_HISTORY_UNEXPECTED) { 924 if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
925 Tracing.printTrace( 925 Tracing.printTrace(
926 "OPERATIONHISTORY", //$NON-NLS-1$ 926 "OPERATIONHISTORY", //$NON-NLS-1$
927 "Exception during notification callback " ~ exception.toString); //$NON-NLS-1$ 927 "Exception during notification callback " ~ exception.toString); //$NON-NLS-1$
934 }); 934 });
935 } 935 }
936 Object[] listenerArray = listeners.getListeners(); 936 Object[] listenerArray = listeners.getListeners();
937 for (int i = 0; i < listenerArray.length; i++) { 937 for (int i = 0; i < listenerArray.length; i++) {
938 IOperationHistoryListener listener = cast(IOperationHistoryListener) listenerArray[i]; 938 IOperationHistoryListener listener = cast(IOperationHistoryListener) listenerArray[i];
939 SafeRunner.run(new class() ISafeRunnable { 939 SafeRunner.run(new class(listener) ISafeRunnable {
940 IOperationHistoryListener listener_; 940 IOperationHistoryListener listener_;
941 this(){ listener_=listener; } 941 this(IOperationHistoryListener a){ listener_=a; }
942 public void handleException(Exception exception) { 942 public void handleException(Exception exception) {
943 if (DEBUG_OPERATION_HISTORY_UNEXPECTED) { 943 if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
944 Tracing.printTrace( 944 Tracing.printTrace(
945 "OPERATIONHISTORY", //$NON-NLS-1$ 945 "OPERATIONHISTORY", //$NON-NLS-1$
946 "Exception during notification callback " ~ exception.toString); //$NON-NLS-1$ 946 "Exception during notification callback " ~ exception.toString); //$NON-NLS-1$