1
/*******************************************************************************
2
* Copyright (c) 2010 Red Hat Inc. 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
package org.eclipse.linuxtools.changelog.ui.tests.utils;
10
import org.eclipse.core.resources.IProject;
11
import org.eclipse.core.resources.IWorkspaceRoot;
12
import org.eclipse.core.resources.ResourcesPlugin;
13
import org.eclipse.core.runtime.Path;
14
import org.eclipse.swtbot.swt.finder.SWTBot;
15
import org.eclipse.swtbot.swt.finder.waits.ICondition;
18
* Condition returns true if and only if a project with
19
* name <code>projectName</code> exists in the current
23
public class SVNProjectCreatedCondition implements ICondition {
25
private String projectName;
27
public SVNProjectCreatedCondition(String projectName) {
28
this.projectName = projectName;
31
public boolean test() throws Exception {
32
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
33
IProject project = (IProject)wsRoot.findMember(new Path(projectName));
40
public void init(SWTBot bot) {
41
// no initialization; don't need bot
44
public String getFailureMessage() {