Move alltests plugin to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui.swtbot.tests / src / org / eclipse / linuxtools / tmf / ui / swtbot / tests / conditions / ViewClosed.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.swtbot.eclipse.finder.widgets.SWTBotView;
16 import org.eclipse.swtbot.swt.finder.SWTBot;
17 import org.eclipse.swtbot.swt.finder.waits.ICondition;
18
19 /**
20 * Is a view closed?
21 *
22 * @author Matthew Khouzam
23 */
24 class ViewClosed implements ICondition {
25 private final SWTBotView fView;
26
27 public ViewClosed(SWTBotView view) {
28 fView = view;
29 }
30
31 @Override
32 public boolean test() throws Exception {
33 return (fView != null) && (!fView.isActive());
34 }
35
36 @Override
37 public void init(SWTBot bot) {
38 }
39
40 @Override
41 public String getFailureMessage() {
42 return null;
43 }
44
45 }
This page took 0.032323 seconds and 5 git commands to generate.