Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TextViewerUndoManager.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | a9566845f1cb |
children | c3583c6ec027 |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
299 extension.setRedraw(false); | 299 extension.setRedraw(false); |
300 } | 300 } |
301 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { | 301 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { |
302 public void run() { | 302 public void run() { |
303 if ( cast(TextViewer)fTextViewer ) | 303 if ( cast(TextViewer)fTextViewer ) |
304 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(true); | 304 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies_package(true); |
305 } | 305 } |
306 }); | 306 }); |
307 | 307 |
308 } else if (((eventType & DocumentUndoEvent.UNDONE) !is 0) || ((eventType & DocumentUndoEvent.REDONE) !is 0)) { | 308 } else if (((eventType & DocumentUndoEvent.UNDONE) !is 0) || ((eventType & DocumentUndoEvent.REDONE) !is 0)) { |
309 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { | 309 fTextViewer.getTextWidget().getDisplay().syncExec(new class() Runnable { |
310 public void run() { | 310 public void run() { |
311 if ( cast(TextViewer)fTextViewer ) | 311 if ( cast(TextViewer)fTextViewer ) |
312 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(false); | 312 (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies_package(false); |
313 } | 313 } |
314 }); | 314 }); |
315 if (event.isCompound()) { | 315 if (event.isCompound()) { |
316 ITextViewerExtension extension= null; | 316 ITextViewerExtension extension= null; |
317 if ( cast(ITextViewerExtension)fTextViewer ) | 317 if ( cast(ITextViewerExtension)fTextViewer ) |
434 StyledText st= fTextViewer.getTextWidget(); | 434 StyledText st= fTextViewer.getTextWidget(); |
435 if (st !is null && !st.isDisposed()) | 435 if (st !is null && !st.isDisposed()) |
436 shell= st.getShell(); | 436 shell= st.getShell(); |
437 } | 437 } |
438 if (Display.getCurrent() !is null) | 438 if (Display.getCurrent() !is null) |
439 MessageDialog.openError(shell, title, ex.getLocalizedMessage()); | 439 MessageDialog.openError(shell, title, ex.msg/+getLocalizedMessage()+/); |
440 else { | 440 else { |
441 Display display; | 441 Display display; |
442 Shell finalShell= shell; | 442 Shell finalShell= shell; |
443 if (finalShell !is null) | 443 if (finalShell !is null) |
444 display= finalShell.getDisplay(); | 444 display= finalShell.getDisplay(); |
445 else | 445 else |
446 display= Display.getDefault(); | 446 display= Display.getDefault(); |
447 display.syncExec(dgRunnable((Shell finalShell_, String title_, Exception ex_ ) { | 447 display.syncExec(dgRunnable((Shell finalShell_, String title_, Exception ex_ ) { |
448 MessageDialog.openError(finalShell_, title_, ex_.getLocalizedMessage()); | 448 MessageDialog.openError(finalShell_, title_, ex_.msg/+getLocalizedMessage()+/); |
449 },finalShell, title, ex )); | 449 },finalShell, title, ex )); |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
453 /* | 453 /* |