# HG changeset patch # User Frank Benoit # Date 1225025943 -3600 # Node ID 0e2944da7cd0c64491876e8b23710ca6e177d0cb # Parent 987b95661bb9d9d5e85ba4c7cf7650119c1e75ba Fix anon class problem diff -r 987b95661bb9 -r 0e2944da7cd0 dwtx/jface/text/TextViewer.d --- a/dwtx/jface/text/TextViewer.d Sat Oct 18 15:02:49 2008 +0200 +++ b/dwtx/jface/text/TextViewer.d Sun Oct 26 13:59:03 2008 +0100 @@ -2652,23 +2652,23 @@ return; fNumberOfPostSelectionChangedEvents[0]++; - display.timerExec(getEmptySelectionChangedEventDelay(), dgRunnable( (int id, bool fireEqualSelection_) { - if (id is fNumberOfPostSelectionChangedEvents[0]) { - // Check again because this is executed after the delay - if (getDisplay() !is null) { - Point selection= fTextWidget.getSelectionRange(); - if (selection !is null) { - IRegion r= widgetRange2ModelRange(new Region(selection.x, selection.y)); - if (fireEqualSelection_ || (r !is null && !(cast(Object)r).opEquals(cast(Object)fLastSentPostSelectionChange)) || r is null) { - fLastSentPostSelectionChange= r; - firePostSelectionChanged(selection.x, selection.y); - } + display.timerExec(getEmptySelectionChangedEventDelay(), dgRunnable( &queuePostSelectionChangedRunner, fNumberOfPostSelectionChangedEvents[0], fireEqualSelection)); + } + private void queuePostSelectionChangedRunner(int id, bool fireEqualSelection_) { + if (id is fNumberOfPostSelectionChangedEvents[0]) { + // Check again because this is executed after the delay + if (getDisplay() !is null) { + Point selection= fTextWidget.getSelectionRange(); + if (selection !is null) { + IRegion r= widgetRange2ModelRange(new Region(selection.x, selection.y)); + if (fireEqualSelection_ || (r !is null && !(cast(Object)r).opEquals(cast(Object)fLastSentPostSelectionChange)) || r is null) { + fLastSentPostSelectionChange= r; + firePostSelectionChanged(selection.x, selection.y); } } } - }, fNumberOfPostSelectionChangedEvents[0], fireEqualSelection)); - } - + } + } /** * Sends out a text selection changed event to all registered post selection changed listeners. *