List<Location> (@NotNull String protocol, @NotNull String path, @NotNull Project project, @NotNull GlobalSearchScope scope) { if (!URLUtil.FILE_PROTOCOL.equals(protocol)) { return Collections.emptyList(); } final String filePath; final int lineNumber; final int columnNumber; int lastColonIndex = path.lastIndexOf(':'); if (lastColonIndex > 3) { // on Windows, paths start with /C: and that colon is not a line number separator int lastValue = StringUtil.parseInt(path.substring(lastColonIndex + 1), -1); int penultimateColonIndex = path.lastIndexOf(':', lastColonIndex - 1); if (penultimateColonIndex > 3) { int penultimateValue = StringUtil.parseInt(path.substring(penultimateColonIndex + 1, lastColonIndex), -1); filePath = path.substring(0, penultimateColonIndex); lineNumber = penultimateValue; columnNumber = lineNumber <= 0 ? -1 : lastValue; } else { filePath = path.substring(0, lastColonIndex); lineNumber = lastValue; columnNumber = -1; } } else { filePath = path; lineNumber = -1; columnNumber = -1; } // Now we should search file with most suitable path // here path may be absolute or relative final String systemIndependentPath = FileUtil.toSystemIndependentName(filePath); final List<VirtualFile> virtualFiles = TestsLocationProviderUtil.findSuitableFilesFor(systemIndependentPath, project); if (virtualFiles.isEmpty()) { return Collections.emptyList(); } final List<Location> locations = new ArrayList<>(2); for (VirtualFile file : virtualFiles) { locations.add(createLocationFor(project, file, lineNumber, columnNumber)); } return locations; }