| Index: editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
|
| similarity index 53%
|
| copy from editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java
|
| copy to editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
|
| index 8262ac0b1df93e5efd1186a894040a3ad6960346..78d451e4ebb207cf2e0bb055b0eb0a9d169424d6 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
|
| @@ -11,39 +11,29 @@
|
| * or implied. See the License for the specific language governing permissions and limitations under
|
| * the License.
|
| */
|
| +package com.google.dart.ui.test.driver;
|
|
|
| -package com.google.dart.engine.services.refactoring;
|
| +import com.google.dart.ui.test.util.UiContext;
|
| +
|
| +import org.eclipse.swt.widgets.Shell;
|
|
|
| /**
|
| - * {@link ProgressMonitor} which ignores interactions.
|
| + * The {@link Operation} that waits for the {@link Shell} closing.
|
| */
|
| -public class NullProgressMonitor implements ProgressMonitor {
|
| - @Override
|
| - public void beginTask(String name, int totalWork) {
|
| - }
|
| +public class ShellClosedOperation extends Operation {
|
| + private final String shellText;
|
|
|
| - @Override
|
| - public void done() {
|
| - }
|
| -
|
| - @Override
|
| - public void internalWorked(double work) {
|
| - }
|
| -
|
| - @Override
|
| - public boolean isCanceled() {
|
| - return false;
|
| - }
|
| -
|
| - @Override
|
| - public void setCanceled() {
|
| + public ShellClosedOperation(String shellText) {
|
| + this.shellText = shellText;
|
| }
|
|
|
| @Override
|
| - public void subTask(String name) {
|
| + public boolean isReady(UiContext context) throws Exception {
|
| + Shell shell = context.findShell(shellText);
|
| + return shell == null || shell.isDisposed();
|
| }
|
|
|
| @Override
|
| - public void worked(int work) {
|
| + public void run(UiContext context) throws Exception {
|
| }
|
| }
|
|
|