ret[0] = ifile.getProject().getName(); ret[1] = ifile.getProjectRelativePath().toString();
IWorkspaceRoot workspaceRoot = null; IFile ifile = null; try { workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); String projectName = RefactorSession.getInstance().getProjectName(); for (IFile i : workspaceRoot.findFilesForLocation(Path.fromOSString(FileStuff.fullpath(file)))) { if (i.getProject().getName().equalsIgnoreCase(projectName)) { ifile = i; break; } if (ifile==null) ifile = i; } } catch (IllegalStateException e) {  } if (ifile!=null) { ret[0] = ifile.getProject().getName(); ret[1] = ifile.getProjectRelativePath().toString(); } else { ret[0] = null; ret[1] = file.getPath(); }
	public String [] getProjectRelativePath(File file) {		IFile ifile = ResourceUtil.getIFile(file.getAbsolutePath());		if (ifile==null) return null;		String [] ret = new String[2];		ret[0] = ifile.getProject().getName();		ret[1] = ifile.getProjectRelativePath().toString();		return ret;	}