private static IJavaSearchScope create(IJavaProject javaProject) throws JavaModelException { List elements= getSourceRoots(javaProject); addReferencingProjects(javaProject.getProject(), elements); return SearchEngine.createJavaSearchScope((IJavaElement[]) elements.toArray(new IJavaElement[elements.size()]), false);
public static IJavaSearchScope create(IJavaElement javaElement) throws JavaModelException { if (javaElement instanceof IMember) { IMember member= (IMember) javaElement; if (JdtFlags.isPrivate(member)) { if (member.getCompilationUnit() != null) return SearchEngine.createJavaSearchScope(new IJavaElement[] { member.getCompilationUnit()}); else return SearchEngine.createJavaSearchScope(new IJavaElement[] { member }); } if (!JdtFlags.isPublic(member) && !JdtFlags.isProtected(member) && member.getCompilationUnit() != null) { IPackageFragment pack= (IPackageFragment) member.getCompilationUnit().getParent(); return SearchEngine.createJavaSearchScope(new IJavaElement[] { pack }); } } return create(javaElement.getJavaProject());
	private static IJavaSearchScope create(IJavaProject javaProject) throws JavaModelException {		List elements= getSourceRoots(javaProject);		addReferencingProjects(javaProject.getProject(), elements);		return SearchEngine.createJavaSearchScope((IJavaElement[]) elements.toArray(new IJavaElement[elements.size()]), false);	}