public static IStorage getResourceBundle(IJavaProject javaProject, AccessorClassReference accessorClassReference) throws JavaModelException { String resourceBundle= accessorClassReference.getResourceBundleName(); String resourceName= Signature.getSimpleName(resourceBundle) + NLSRefactoring.PROPERTY_FILE_EXT; String packName= Signature.getQualifier(resourceBundle); ITypeBinding accessorClass= accessorClassReference.getBinding();  if (accessorClass.isFromSource()) return getResourceBundle(javaProject, packName, resourceName); else if (accessorClass.getJavaElement() != null) return getResourceBundle((IPackageFragmentRoot)accessorClass.getJavaElement().getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT), packName, resourceName);
public static IStorage getResourceBundle(IJavaProject javaProject, String packageName, String resourceName) throws JavaModelException { IPackageFragmentRoot[] allRoots= javaProject.getAllPackageFragmentRoots(); for (int i= 0; i < allRoots.length; i++) { IPackageFragmentRoot root= allRoots[i]; if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { IStorage storage= getResourceBundle(root, packageName, resourceName); if (storage != null) return storage; } }
	public static IStorage getResourceBundle(IJavaProject javaProject, AccessorClassReference accessorClassReference) throws JavaModelException {		String resourceBundle= accessorClassReference.getResourceBundleName();		String resourceName= Signature.getSimpleName(resourceBundle) + NLSRefactoring.PROPERTY_FILE_EXT;		String packName= Signature.getQualifier(resourceBundle);		ITypeBinding accessorClass= accessorClassReference.getBinding();				if (accessorClass.isFromSource())			return getResourceBundle(javaProject, packName, resourceName);		else if (accessorClass.getJavaElement() != null)			return getResourceBundle((IPackageFragmentRoot)accessorClass.getJavaElement().getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT), packName, resourceName);				return null;	}