String (JpsModule rootModel, String path) { String url = null; if (new File(path).exists()) { //absolute path url = pathToUrl(path); } else { final String relativePath = new File(myRootPath, path).getPath(); //inside current project final File file = new File(relativePath); if (file.exists()) { url = pathToUrl(relativePath); } else if (path.startsWith("/")) { //relative to other project final String moduleName = EPathCommonUtil.getRelativeModuleName(path); final String relativeToRootPath = EPathCommonUtil.getRelativeToModulePath(path); url = EPathCommonUtil.expandEclipseRelative2ContentRoots(myCurrentRoots, moduleName, relativeToRootPath); } } if (url == null) { url = pathToUrl(path); } return prepareValidUrlInsideJar(url); }