mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
take directory name from CommonDataKeys.VIRTUAL_FILE, if we can not get directory name from Psi (IDEA-164440)
This commit is contained in:
@@ -100,6 +100,11 @@ public class FindInProjectUtil {
|
||||
directoryName = directories.length == 1 ? directories[0].getVirtualFile().getPresentableUrl():null;
|
||||
}
|
||||
|
||||
if (directoryName == null) {
|
||||
VirtualFile virtualFile = CommonDataKeys.VIRTUAL_FILE.getData(dataContext);
|
||||
if (virtualFile != null && virtualFile.isDirectory()) directoryName = virtualFile.getPresentableUrl();
|
||||
}
|
||||
|
||||
Module module = LangDataKeys.MODULE_CONTEXT.getData(dataContext);
|
||||
if (module != null) {
|
||||
model.setModuleName(module.getName());
|
||||
|
||||
Reference in New Issue
Block a user