throw new SVNException("An (un?)expected error has occured! Please report to users@subclipse.tigris.org ! pathForLocation(" + status.getPathString() +") is null ! Url: " + status.getUrlString() + " Projects: " + ResourcesPlugin.getWorkspace().getRoot().getProjects());
if (!nullResourceLogged) { String errorMsg = Policy.bind("SVNWorkspaceRoot.nullResource", status.getPathString()); IConsoleListener console = SVNProviderPlugin.getPlugin().getConsoleListener(); if (console != null) { console.logError(errorMsg); console.logError(Policy.bind("SVNWorkspaceRoot.nullResource.2")); console.logError(Policy.bind("SVNWorkspaceRoot.nullResource.3")); console.logError(Policy.bind("SVNWorkspaceRoot.nullResource.4")); console.logError(Policy.bind("SVNWorkspaceRoot.nullResource.5")); console.logError(Policy.bind("SVNWorkspaceRoot.nullResource.6")); } nullResourceLogged = true; throw new SVNException(errorMsg); } throw new SVNException("");
    public static IResource getResourceFor(ResourceStatus status) throws SVNException    {    	if (status.path == null) return null;		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();		IPath resourcePath = pathForLocation(status.getPath());		if (resourcePath == null) 		{			throw new SVNException("An (un?)expected error has occured! Please report to users@subclipse.tigris.org ! pathForLocation(" 				+ status.getPathString() +") is null ! Url: " + status.getUrlString() + " Projects: " + ResourcesPlugin.getWorkspace().getRoot().getProjects());		}		int kind = getResourceType(resourcePath);					if (kind == IResource.FILE)		{			return root.getFile(resourcePath);		}		else if(kind == IResource.FOLDER)		{			return root.getFolder(resourcePath);		}		else if (kind == IResource.PROJECT)		{			return root.getProject(resourcePath.segment(0));		}		else if (kind == IResource.ROOT)		{			return root;		}		else if (status.getNodeKind() == SVNNodeKind.FILE)		{			return root.getFile(resourcePath);		}		else		{			if (resourcePath.isRoot())			{				return root;			}			else if (resourcePath.segmentCount() == 1)			{				return root.getProject(resourcePath.segment(0));			}		}//        if (this.getNodeKind() == SVNNodeKind.UNKNOWN) {//        	File file = this.getPath().toFile();//        	if (file.isDirectory())//        		resource = workspaceRoot.getContainerForLocation(pathEclipse);//        	else//        		resource = workspaceRoot.getFileForLocation(pathEclipse);//        }		return root.getFolder(resourcePath);    }