mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90428 CTRL+ SHIFT + N dialog should show paths relative to content url(not to .idea folder locations)
This commit is contained in:
@@ -24,7 +24,9 @@ import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -80,6 +82,11 @@ public class GotoFileCellRenderer extends PsiElementListCellRenderer<PsiFile> {
|
||||
if (project == null) {
|
||||
return url;
|
||||
}
|
||||
VirtualFile root = ProjectFileIndex.SERVICE.getInstance(project).getContentRootForFile(virtualFile);
|
||||
if (root != null) {
|
||||
return VfsUtilCore.getRelativePath(virtualFile, root, File.separatorChar);
|
||||
}
|
||||
|
||||
final VirtualFile baseDir = project.getBaseDir();
|
||||
if (baseDir != null) {
|
||||
//noinspection ConstantConditions
|
||||
|
||||
Reference in New Issue
Block a user