# HG changeset patch # User Frank Benoit # Date 1208097463 -7200 # Node ID ef6c06252a877d2769c823eee1d9f3ca2d70bda2 # Parent 6d1acb32839db9e0bdb55bfaa25e7ca89aecb8b1 fix anon classes diff -r 6d1acb32839d -r ef6c06252a87 dwtx/core/runtime/IProgressMonitor.d --- a/dwtx/core/runtime/IProgressMonitor.d Sun Apr 13 16:37:23 2008 +0200 +++ b/dwtx/core/runtime/IProgressMonitor.d Sun Apr 13 16:37:43 2008 +0200 @@ -52,7 +52,7 @@ /** Constant indicating an unknown amount of work. */ - public final const int UNKNOWN = -1; + public static const int UNKNOWN = -1; /** * Notifies that the main task is beginning. This must only be called once diff -r 6d1acb32839d -r ef6c06252a87 dwtx/jface/operation/AccumulatingProgressMonitor.d --- a/dwtx/jface/operation/AccumulatingProgressMonitor.d Sun Apr 13 16:37:23 2008 +0200 +++ b/dwtx/jface/operation/AccumulatingProgressMonitor.d Sun Apr 13 16:37:43 2008 +0200 @@ -126,10 +126,16 @@ synchronized (this) { collector = null; } - display.syncExec(new class Runnable { + display.syncExec(new class(name,totalWork) Runnable { + String name_; + int totalWork_; + this(String a, int b){ + name_=a; + totalWork_=b; + } public void run() { - currentTask = name; - getWrappedProgressMonitor().beginTask(name, totalWork); + currentTask = name_; + getWrappedProgressMonitor().beginTask(name_, totalWork_); } }); } @@ -189,10 +195,14 @@ synchronized (this) { collector = null; } - display.syncExec(new class Runnable { + display.syncExec(new class(name) Runnable { + String name_; + this(String a){ + name_=a; + } public void run() { - currentTask = name; - getWrappedProgressMonitor().setTaskName(name); + currentTask = name_; + getWrappedProgressMonitor().setTaskName(name_); } }); } @@ -253,16 +263,20 @@ return; } - display.asyncExec(new class(pm) Runnable { + display.asyncExec(new class(pm,reason) Runnable { IProgressMonitor pm_; - this(IProgressMonitor a){ pm_=a; } + IStatus reason_; + this(IProgressMonitor a,IStatus b){ + pm_=a; + reason_=b; + } /* (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { - (cast(IProgressMonitorWithBlocking) pm_).setBlocked(reason); + (cast(IProgressMonitorWithBlocking) pm_).setBlocked(reason_); //Do not give a shell as we want it to block until it opens. - Dialog.getBlockedHandler().showBlocked(pm, reason, currentTask); + Dialog.getBlockedHandler().showBlocked(pm_, reason_, currentTask); } }); } diff -r 6d1acb32839d -r ef6c06252a87 dwtx/jface/operation/ModalContext.d --- a/dwtx/jface/operation/ModalContext.d Sun Apr 13 16:37:23 2008 +0200 +++ b/dwtx/jface/operation/ModalContext.d Sun Apr 13 16:37:43 2008 +0200 @@ -105,7 +105,7 @@ */ private this(IRunnableWithProgress operation, IProgressMonitor monitor, Display display) { - super(/+"ModalContext"+/); //$NON-NLS-1$ + super(&run2); //$NON-NLS-1$ Assert.isTrue(monitor !is null && display !is null); runnable = operation; progressMonitor = new AccumulatingProgressMonitor(monitor, display); @@ -116,7 +116,7 @@ /* (non-Javadoc) * Method declared on Thread. */ - public /+override+/ void run() { + public /+override+/ void run2() { try { if (runnable !is null) { runnable.run(progressMonitor);