mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
find usages: correctly show file path for usage in injected block
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.usages.impl.rules;
|
||||
|
||||
import com.intellij.injected.editor.VirtualFileWindow;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -54,6 +55,9 @@ public class DirectoryGroupingRule implements UsageGroupingRule {
|
||||
UsageInFile usageInFile = (UsageInFile)usage;
|
||||
VirtualFile file = usageInFile.getFile();
|
||||
if (file != null) {
|
||||
if (file instanceof VirtualFileWindow) {
|
||||
file = ((VirtualFileWindow)file).getDelegate();
|
||||
}
|
||||
VirtualFile dir = file.getParent();
|
||||
if (dir == null) return null;
|
||||
return getGroupForFile(dir);
|
||||
|
||||
Reference in New Issue
Block a user