Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WaitForWidget |
|
| 1.0;1 |
1 | /******************************************************************************* | |
2 | * Copyright (c) 2008 Ketan Padegaonkar and others. | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | * | |
8 | * Contributors: | |
9 | * Ketan Padegaonkar - initial API and implementation | |
10 | *******************************************************************************/ | |
11 | package org.eclipse.swtbot.swt.finder.waits; | |
12 | ||
13 | import java.util.List; | |
14 | ||
15 | import org.eclipse.swt.widgets.Widget; | |
16 | import org.hamcrest.Matcher; | |
17 | ||
18 | /** | |
19 | * @author Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com> | |
20 | * @see Conditions | |
21 | * @version $Id$ | |
22 | * @since 2.0 | |
23 | */ | |
24 | class WaitForWidget<T extends Widget> extends WaitForObjectCondition<T> { | |
25 | ||
26 | WaitForWidget(Matcher<T> matcher) { | |
27 | 1264 | super(matcher); |
28 | 1264 | } |
29 | ||
30 | public String getFailureMessage() { | |
31 | 15 | return "Could not find widget matching: " + matcher; //$NON-NLS-1$ |
32 | } | |
33 | ||
34 | protected List<T> findMatches() { | |
35 | 1315 | return bot.getFinder().findControls(matcher); |
36 | } | |
37 | ||
38 | } |