# HG changeset patch # User Frank Benoit # Date 1207923541 -7200 # Node ID 9d7d88f13040a4c98b4144ff6dec84a769925042 # Parent 076d0807c32a0c0325bcf7cb0600c3cb692a7667 Fix anon classes diff -r 076d0807c32a -r 9d7d88f13040 dwtx/jface/preference/PreferenceDialog.d --- a/dwtx/jface/preference/PreferenceDialog.d Fri Apr 11 16:18:16 2008 +0200 +++ b/dwtx/jface/preference/PreferenceDialog.d Fri Apr 11 16:19:01 2008 +0200 @@ -382,13 +382,15 @@ */ protected override Control createContents(Composite parent) { Control[1] control; - BusyIndicator.showWhile(getShell().getDisplay(), new class(parent) Runnable { + BusyIndicator.showWhile(getShell().getDisplay(), new class(parent,control) Runnable { Composite parent_; - this(Composite a){ + Control[] control_; + this(Composite a,Control[] b){ parent_=a; + control_=b; } public void run() { - control[0] = callSuperCreateContents(parent); + control_[0] = callSuperCreateContents(parent_); // Add the first page selectSavedItem(); } @@ -629,7 +631,7 @@ } }); - final IPropertyChangeListener fontListener = new class IPropertyChangeListener { + IPropertyChangeListener fontListener = new class IPropertyChangeListener { public void propertyChange(PropertyChangeEvent event) { if (JFaceResources.BANNER_FONT.equals(event.getProperty())) { updateMessage(); @@ -646,9 +648,13 @@ } }; - titleArea.addDisposeListener(new class DisposeListener { + titleArea.addDisposeListener(new class(fontListener) DisposeListener { + IPropertyChangeListener fontListener_; + this(IPropertyChangeListener a){ + fontListener_=a; + } public void widgetDisposed(DisposeEvent event) { - JFaceResources.getFontRegistry().removeListener(fontListener); + JFaceResources.getFontRegistry().removeListener(fontListener_); } }); JFaceResources.getFontRegistry().addListener(fontListener); @@ -1244,9 +1250,13 @@ // (this allows lazy page control creation) if (currentPage.getControl() is null) { bool[1] failed; failed[0] = false; - SafeRunnable.run(new class ISafeRunnable { + SafeRunnable.run(new class(failed) ISafeRunnable { + bool[] failed_; + this(bool[] a){ + this.failed_=a; + } public void handleException(Exception e) { - failed[0] = true; + this.failed_[0] = true; } public void run() { @@ -1263,15 +1273,21 @@ } // Force calculation of the page's description label because // label can be wrapped. - final Point[] size = new Point[1]; - final Point failed = new Point(-1, -1); - SafeRunnable.run(new class ISafeRunnable { + Point[1] size; + Point failed = new Point(-1, -1); + SafeRunnable.run(new class(size,failed) ISafeRunnable { + Point[] size_; + Point failed_; + this(Point[] a,Point b){ + size_=a; + failed_=b; + } public void handleException(Exception e) { - size[0] = failed; + size_[0] = failed_; } public void run() { - size[0] = currentPage.computeSize(); + size_[0] = currentPage.computeSize(); } }); if (size[0].opEquals(failed)) {