| /******************************************************************************* |
| * Copyright (c) 2004, 2007 Mylyn project committers and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| *******************************************************************************/ |
| /* |
| * Created on Jul 20, 2004 |
| */ |
| package org.eclipse.mylyn.java.tests; |
| |
| import java.lang.reflect.InvocationTargetException; |
| |
| import org.eclipse.core.resources.IProject; |
| import org.eclipse.core.resources.IWorkspaceRoot; |
| import org.eclipse.core.resources.ResourcesPlugin; |
| import org.eclipse.core.runtime.CoreException; |
| |
| /** |
| * @author Shawn Minto |
| */ |
| public class TestProject { |
| public IProject project; |
| |
| public TestProject(final String name) throws CoreException, InvocationTargetException, InterruptedException { |
| IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); |
| project = root.getProject(name); |
| project.create(null); |
| project.open(null); |
| } |
| |
| public IProject getProject() { |
| return project; |
| } |
| } |