mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Wrong result when use regexp in "find in path" (IDEA-151495)
This commit is contained in:
@@ -869,6 +869,7 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
|
||||
assertEquals("public static MyType my = 1;", buildStringToFindForIndicesFromRegExp("public static (@A)? MyType my\\w+? = 1;", myProject));
|
||||
assertEquals(" Foo ", buildStringToFindForIndicesFromRegExp("\\bFoo\\b", myProject));
|
||||
assertEquals("", buildStringToFindForIndicesFromRegExp("foo|bar", myProject));
|
||||
assertEquals(" Exit Foo Bar Baz", buildStringToFindForIndicesFromRegExp("\\nExit\\tFoo\\rBar\\fBaz", myProject));
|
||||
}
|
||||
|
||||
public void testCreateFileMaskCondition() {
|
||||
|
||||
@@ -413,7 +413,11 @@ public class FindInProjectUtil {
|
||||
|
||||
@Override
|
||||
public String fun(PsiElement element) {
|
||||
return regExpCharPsiClass.isInstance(element) ? element.getText() : " ";
|
||||
if(regExpCharPsiClass.isInstance(element)) {
|
||||
String text = element.getText();
|
||||
if (!"\\n".equals(text) && !"\\t".equals(text) && !"\\f".equals(text) && !"\\r".equals(text)) return text;
|
||||
}
|
||||
return " ";
|
||||
}
|
||||
}, "");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user