if (parent instanceof IPackageFragment) { IPackageFragment pack= (IPackageFragment) parent; if (pack.exists()) { ICompilationUnit[] cuArray= pack.getCompilationUnits(); ArrayList typesArrayList= new ArrayList(); for (int i= 0; i < cuArray.length; i++) { ICompilationUnit cu= cuArray[i]; IType[] types= cu.getTypes(); for (int j= 0; j < types.length; j++) { if (TestSearchEngine.isTestImplementor(types[j])) typesArrayList.add(types[j]); } } return typesArrayList.toArray();
ICompilationUnit[] cuArray= pack.getCompilationUnits(); List typesArrayList= new ArrayList(); for (int i= 0; i < cuArray.length; i++) { ICompilationUnit cu= cuArray[i]; IType[] types= cu.getTypes(); for (int j= 0; j < types.length; j++) { IType type= types[j]; if (type.isClass() && ! Flags.isAbstract(type.getFlags()) && TestSearchEngine.isTestImplementor(type)) typesArrayList.add(types[j]);
		public Object[] getElements(Object parent) {			try {				if (parent instanceof IPackageFragment) {					IPackageFragment pack= (IPackageFragment) parent;					if (pack.exists()) { 						ICompilationUnit[] cuArray= pack.getCompilationUnits();						ArrayList typesArrayList= new ArrayList();						for (int i= 0; i < cuArray.length; i++) {							ICompilationUnit cu= cuArray[i];							IType[] types= cu.getTypes();							for (int j= 0; j < types.length; j++) {								if (TestSearchEngine.isTestImplementor(types[j]))										typesArrayList.add(types[j]);							}						}						return typesArrayList.toArray();					}				}			} catch (JavaModelException e) {				JUnitPlugin.log(e);			}			return new Object[0];		}