mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
find: fix inconsistent search in project/.iml/.ipr files (IJPL-49974)
GitOrigin-RevId: 8b8f5c3dc399675687e1959598b055ee83bcebda
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4a233dcb96
commit
1428553ad5
@@ -563,14 +563,7 @@ public class FindModel extends UserDataHolderBase implements Cloneable {
|
||||
if (changed) {
|
||||
this.directoryName = directoryName;
|
||||
notifyObservers();
|
||||
if (directoryName != null) {
|
||||
String path = FileUtil.toSystemIndependentName(directoryName);
|
||||
if (path.endsWith("/.idea") || path.contains("/.idea/")) {
|
||||
setSearchInProjectFiles(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -694,12 +687,6 @@ public class FindModel extends UserDataHolderBase implements Cloneable {
|
||||
if (changed) {
|
||||
this.fileFilter = fileFilter;
|
||||
notifyObservers();
|
||||
if (fileFilter != null) {
|
||||
List<String> split = StringUtil.split(fileFilter, ",");
|
||||
if (ContainerUtil.exists(split, s -> s.endsWith("*.iml") || s.endsWith("*.ipr") || s.endsWith("*.iws"))) {
|
||||
setSearchInProjectFiles(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,6 +870,20 @@ public class FindModel extends UserDataHolderBase implements Cloneable {
|
||||
}
|
||||
|
||||
public boolean isSearchInProjectFiles() {
|
||||
if (!mySearchInProjectFiles) {
|
||||
if (fileFilter != null) {
|
||||
List<String> split = StringUtil.split(fileFilter, ",");
|
||||
if (ContainerUtil.exists(split, s -> s.endsWith(".iml") || s.endsWith(".ipr") || s.endsWith(".iws"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (directoryName != null) {
|
||||
String path = FileUtil.toSystemIndependentName(directoryName);
|
||||
if (path.endsWith("/.idea") || path.contains("/.idea/")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return mySearchInProjectFiles;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user