1 13 14 17 package org.eclipse.jdt.internal.junit.launcher; 18 19 import java.util.HashSet ; 20 import java.util.Set ; 21 22 import org.eclipse.core.runtime.IProgressMonitor; 23 24 import org.eclipse.jdt.core.IJavaElement; 25 import org.eclipse.jdt.core.IType; 26 import org.eclipse.jdt.core.JavaCore; 27 28 29 class ContainerTestSearchExtent implements ITestSearchExtent { 30 private final IProgressMonitor fPm; 31 32 private final String fHandle; 33 34 ContainerTestSearchExtent(IProgressMonitor pm, String handle) { 35 fPm = pm; 36 fHandle = handle; 37 } 38 39 public IType[] find(ITestFinder finder) { 40 IJavaElement container = JavaCore.create(fHandle); 41 Set result = new HashSet (); 42 finder.findTestsInContainer(new Object [] { container }, result, fPm); 43 return (IType[]) result.toArray(new IType[result.size()]); 44 } 45 } | Popular Tags |