private static void addReferencingProjects(IProject focus, List list) throws JavaModelException { IPath path= focus.getProject().getFullPath(); IProject[] projects= focus.getProject().getReferencingProjects(); for (int i= 0, length= projects.length; i < length; i++) { IProject project= projects[i]; IJavaProject javaProject= JavaCore.create(project); IClasspathEntry[] classpath= javaProject.getRawClasspath(); for (int j= 0, length2= classpath.length; j < length2; j++) { IClasspathEntry entry= classpath[j]; if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT && path.equals(entry.getPath())) { list.addAll(getSourceRoots(javaProject)); if (entry.isExported()) addReferencingProjects(javaProject.getProject(), list); break; }
private static void addReferencingProjects(IJavaProject focus, Set projects) throws JavaModelException { IProject[] referencingProjects= focus.getProject().getReferencingProjects(); for (int i= 0; i < referencingProjects.length; i++) { IJavaProject candidate= JavaCore.create(referencingProjects[i]); if (projects.contains(candidate)) continue; IClasspathEntry entry= getReferencingClassPathEntry(candidate, focus); if (entry != null) { projects.add(candidate); if (entry.isExported()) addReferencingProjects(candidate, projects);
	private static void addReferencingProjects(IProject focus, List list) throws JavaModelException {		IPath path= focus.getProject().getFullPath();		IProject[] projects= focus.getProject().getReferencingProjects();		for (int i= 0, length= projects.length; i < length; i++) {			IProject project= projects[i];			IJavaProject javaProject= JavaCore.create(project);			IClasspathEntry[] classpath= javaProject.getRawClasspath();			for (int j= 0, length2= classpath.length; j < length2; j++) {				IClasspathEntry entry= classpath[j];				if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT && path.equals(entry.getPath())) {					list.addAll(getSourceRoots(javaProject));					if (entry.isExported())						addReferencingProjects(javaProject.getProject(), list);					break;				}			}		}	}