1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
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
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.swtbot
.tests
.conditions
;
15 import org
.eclipse
.swtbot
.swt
.finder
.SWTBot
;
16 import org
.eclipse
.swtbot
.swt
.finder
.waits
.ICondition
;
17 import org
.eclipse
.swtbot
.swt
.finder
.widgets
.SWTBotTree
;
18 import org
.eclipse
.swtbot
.swt
.finder
.widgets
.SWTBotTreeItem
;
21 * Is a tree node available?
23 * @author Matthew Khouzam
25 class TreeNodeAvailable
implements ICondition
{
27 private final SWTBotTree fTree
;
28 private final String fName
;
31 * Is a tree node available
34 * The name of the node
38 public TreeNodeAvailable(String name
, SWTBotTree tree
) {
44 public boolean test() throws Exception
{
46 final SWTBotTreeItem
[] treeItems
= fTree
.getAllItems();
47 for( SWTBotTreeItem ti
: treeItems
){
48 final String text
= ti
.getText();
49 if( text
.equals(fName
)) {
53 } catch (Exception e
) {
59 public void init(SWTBot bot
) {
63 public String
getFailureMessage() {
This page took 0.031616 seconds and 5 git commands to generate.