IType publicType= Utils.getPublicType(cu); if (publicType == null) return null; else return SearchEngine.createSearchPattern(publicType, IJavaSearchConstants.REFERENCES);
IType[] types= cu.getTypes(); if (types.length == 0) return null; ISearchPattern pattern= SearchEngine.createSearchPattern(types[0], IJavaSearchConstants.REFERENCES); for(int i= 1; i < types.length; i++){ pattern= SearchEngine.createOrSearchPattern(pattern, SearchEngine.createSearchPattern(types[i], IJavaSearchConstants.REFERENCES)); } return pattern;
	private static ISearchPattern createSearchPattern(ICompilationUnit cu) throws JavaModelException{		IType publicType= Utils.getPublicType(cu);		if (publicType == null)			return null; 		else			return SearchEngine.createSearchPattern(publicType, IJavaSearchConstants.REFERENCES);	}