mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
EA-46905 - assert: EPathUtil.expandEclipsePathUrl
This commit is contained in:
@@ -90,9 +90,21 @@ public class EPathUtil {
|
||||
/**
|
||||
* @return url
|
||||
*/
|
||||
static String expandEclipsePath2Url(final String path, ModifiableRootModel model, final List<String> currentRoots) {
|
||||
static String expandEclipsePath2Url(final String path,
|
||||
final ModifiableRootModel model,
|
||||
final List<String> currentRoots) {
|
||||
final VirtualFile contentRoot = getContentRoot(model);
|
||||
LOG.assertTrue(contentRoot != null);
|
||||
return expandEclipsePath2Url(path, model, currentRoots, contentRoot);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return url
|
||||
*/
|
||||
static String expandEclipsePath2Url(final String path,
|
||||
final ModifiableRootModel model,
|
||||
final List<String> currentRoots,
|
||||
@NotNull final VirtualFile contentRoot) {
|
||||
final String rootPath = contentRoot.getPath();
|
||||
String url = null;
|
||||
if (new File(path).exists()) { //absolute path
|
||||
|
||||
@@ -125,6 +125,10 @@ public class EclipseClasspathReader extends AbstractEclipseClasspathReader<Modif
|
||||
|
||||
@Override
|
||||
protected String expandEclipsePath2Url(ModifiableRootModel rootModel, String path) {
|
||||
final VirtualFile contentRoot = myContentEntry.getFile();
|
||||
if (contentRoot != null) {
|
||||
return EPathUtil.expandEclipsePath2Url(path, rootModel, myCurrentRoots, contentRoot);
|
||||
}
|
||||
return EPathUtil.expandEclipsePath2Url(path, rootModel, myCurrentRoots);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user