Mercurial > projects > dwt-addons
comparison dwtx/jface/text/DefaultUndoManager.d @ 135:65801ad2b265
Regex fix for anon classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:52:31 +0200 |
parents | 51e6e63f930e |
children | 25170b5a8951 |
comparison
equal
deleted
inserted
replaced
134:51e6e63f930e | 135:65801ad2b265 |
---|---|
880 switch (type) { | 880 switch (type) { |
881 case OperationHistoryEvent.ABOUT_TO_UNDO: | 881 case OperationHistoryEvent.ABOUT_TO_UNDO: |
882 case OperationHistoryEvent.ABOUT_TO_REDO: | 882 case OperationHistoryEvent.ABOUT_TO_REDO: |
883 // if this is one of our operations | 883 // if this is one of our operations |
884 if (event.getOperation().hasContext(fUndoContext)) { | 884 if (event.getOperation().hasContext(fUndoContext)) { |
885 fTextViewer.getTextWidget().getDisplay().syncExec(new Runnable() { | 885 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { |
886 public void run() { | 886 public void run() { |
887 // if we are undoing/redoing a command we generated, then ignore | 887 // if we are undoing/redoing a command we generated, then ignore |
888 // the document changes associated with this undo or redo. | 888 // the document changes associated with this undo or redo. |
889 if (event.getOperation() instanceof TextCommand) { | 889 if (event.getOperation() instanceof TextCommand) { |
890 if (fTextViewer instanceof TextViewer) | 890 if (fTextViewer instanceof TextViewer) |
911 break; | 911 break; |
912 case OperationHistoryEvent.UNDONE: | 912 case OperationHistoryEvent.UNDONE: |
913 case OperationHistoryEvent.REDONE: | 913 case OperationHistoryEvent.REDONE: |
914 case OperationHistoryEvent.OPERATION_NOT_OK: | 914 case OperationHistoryEvent.OPERATION_NOT_OK: |
915 if (event.getOperation() is fOperation) { | 915 if (event.getOperation() is fOperation) { |
916 fTextViewer.getTextWidget().getDisplay().syncExec(new Runnable() { | 916 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { |
917 public void run() { | 917 public void run() { |
918 listenToTextChanges(true); | 918 listenToTextChanges(true); |
919 fOperation= null; | 919 fOperation= null; |
920 if (fTextViewer instanceof TextViewer) | 920 if (fTextViewer instanceof TextViewer) |
921 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(false); | 921 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(false); |
1335 final Shell finalShell= shell; | 1335 final Shell finalShell= shell; |
1336 if (finalShell !is null) | 1336 if (finalShell !is null) |
1337 display= finalShell.getDisplay(); | 1337 display= finalShell.getDisplay(); |
1338 else | 1338 else |
1339 display= Display.getDefault(); | 1339 display= Display.getDefault(); |
1340 display.syncExec(new Runnable() { | 1340 display.syncExec(new class() Runnable { |
1341 public void run() { | 1341 public void run() { |
1342 MessageDialog.openError(finalShell, title, ex.getLocalizedMessage()); | 1342 MessageDialog.openError(finalShell, title, ex.getLocalizedMessage()); |
1343 } | 1343 } |
1344 }); | 1344 }); |
1345 } | 1345 } |