pull up getRelativePath() to VfsUtilCore

This commit is contained in:
Dmitry Jemerov
2011-09-23 14:27:02 +02:00
parent 7128a3866c
commit caf5a51127
35 changed files with 119 additions and 118 deletions
@@ -33,7 +33,7 @@ import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.Trinity;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.FieldPanel;
@@ -417,7 +417,7 @@ public class SourcePathsStep extends AbstractStepWithProgress<List<Trinity<Strin
final String fullPath = myField.getText().trim().replace(File.separatorChar, '/');
final VirtualFile fileByPath = LocalFileSystem.getInstance().findFileByPath(fullPath);
LOG.assertTrue(fileByPath != null);
myField.setText(VfsUtil.getRelativePath(fileByPath, contentEntryDir, File.separatorChar));
myField.setText(VfsUtilCore.getRelativePath(fileByPath, contentEntryDir, File.separatorChar));
}
}
}
@@ -20,7 +20,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.TitlePanel;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.*;
import com.intellij.util.PlatformIcons;
@@ -108,7 +108,7 @@ public class DetectedRootsChooserDialog extends DialogWrapper {
if (leaf) {
VirtualFile ancestor = (VirtualFile)((CheckedTreeNode)node.getParent()).getUserObject();
if (ancestor != null) {
text = VfsUtil.getRelativePath(file, ancestor, File.separatorChar);
text = VfsUtilCore.getRelativePath(file, ancestor, File.separatorChar);
}
else {
text = file.getPresentableUrl();