tmf: batch import wizard smoke test
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.swtbot.tests / src / org / eclipse / linuxtools / tmf / ui / swtbot / tests / conditions / WizardReady.java
1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.ui.swtbot.tests.conditions;
14
15 import org.eclipse.jface.wizard.Wizard;
16 import org.eclipse.swtbot.swt.finder.SWTBot;
17 import org.eclipse.swtbot.swt.finder.waits.ICondition;
18
19 /**
20 * Is a given wizard ready?
21 *
22 * @author Matthew Khouzam
23 */
24 class WizardReady implements ICondition {
25
26 private final Wizard fWizard;
27
28 public WizardReady(Wizard wizard) {
29 fWizard = wizard;
30 }
31
32 @Override
33 public boolean test() throws Exception {
34 if (fWizard.getShell() == null) {
35 return false;
36 }
37 return true;
38 }
39
40 @Override
41 public void init(SWTBot bot) {
42 }
43
44 @Override
45 public String getFailureMessage() {
46 return null;
47 }
48
49 }
This page took 0.050048 seconds and 5 git commands to generate.