String (boolean allowEmpty) { VirtualFile dir = ProjectFileNode.findBaseDir(getProject()); String location = dir == null ? null : VfsUtilCore.getRelativePath(getVirtualFile(), dir); if (location != null && (allowEmpty || !location.isEmpty())) return location; return FileUtil.getLocationRelativeToUserHome(getVirtualFile().getPresentableUrl()); }