Mercurial > projects > dwt-addons
comparison dwtx/jface/operation/AccumulatingProgressMonitor.d @ 70:46a6e0e6ccd4
Merge with d-fied sources of 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 01:36:46 +0200 |
parents | ef6c06252a87 |
children |
comparison
equal
deleted
inserted
replaced
69:07b9d96fd764 | 70:46a6e0e6ccd4 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | 2 * Copyright (c) 2000, 2007 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
124 */ | 124 */ |
125 public override void beginTask(String name, int totalWork) { | 125 public override void beginTask(String name, int totalWork) { |
126 synchronized (this) { | 126 synchronized (this) { |
127 collector = null; | 127 collector = null; |
128 } | 128 } |
129 display.syncExec(new class(name,totalWork) Runnable { | 129 display.asyncExec(new class(name,totalWork) Runnable { |
130 String name_; | 130 String name_; |
131 int totalWork_; | 131 int totalWork_; |
132 this(String a, int b){ | 132 this(String a, int b){ |
133 name_=a; | 133 name_=a; |
134 totalWork_=b; | 134 totalWork_=b; |
168 */ | 168 */ |
169 public override void done() { | 169 public override void done() { |
170 synchronized (this) { | 170 synchronized (this) { |
171 collector = null; | 171 collector = null; |
172 } | 172 } |
173 display.syncExec(new class Runnable { | 173 display.asyncExec(new class Runnable { |
174 public void run() { | 174 public void run() { |
175 getWrappedProgressMonitor().done(); | 175 getWrappedProgressMonitor().done(); |
176 } | 176 } |
177 }); | 177 }); |
178 } | 178 } |
193 */ | 193 */ |
194 public override void setTaskName(String name) { | 194 public override void setTaskName(String name) { |
195 synchronized (this) { | 195 synchronized (this) { |
196 collector = null; | 196 collector = null; |
197 } | 197 } |
198 display.syncExec(new class(name) Runnable { | 198 display.asyncExec(new class(name) Runnable { |
199 String name_; | 199 String name_; |
200 this(String a){ | 200 this(String a){ |
201 name_=a; | 201 name_=a; |
202 } | 202 } |
203 public void run() { | 203 public void run() { |