mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-40095 RUBY-22288 IDEA-197952 Change regex to capture non-word character. Delete unnecessary non-capturing group.
This commit is contained in:
@@ -502,6 +502,17 @@ class Intf {
|
||||
assert gotoSymbol('start') == [m1] // works as usual for non-qualified patterns
|
||||
}
|
||||
|
||||
void "test colon in search end"() {
|
||||
def foo = myFixture.addClass('class Foo { }')
|
||||
assert gotoClass('Foo:') == [foo]
|
||||
}
|
||||
|
||||
void "test multi-word class name with only first letter of second word"() {
|
||||
myFixture.addClass('class Foo { }')
|
||||
def fooBar = myFixture.addClass('class FooBar { }')
|
||||
assert gotoClass('Foo B') == [fooBar]
|
||||
}
|
||||
|
||||
private List<Object> gotoClass(String text, boolean checkboxState = false) {
|
||||
return getPopupElements(new GotoClassModel2(project), text, checkboxState)
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public abstract class AbstractGotoSEContributor<F> implements SearchEverywhereCo
|
||||
|
||||
protected static final Pattern patternToDetectLinesAndColumns = Pattern.compile("(.+?)" + // name, non-greedy matching
|
||||
"(?::|@|,| |#|#L|\\?l=| on line | at line |:?\\(|:?\\[)" + // separator
|
||||
"(\\d+)?(?:(?:\\D)(\\d+)?)?" + // line + column
|
||||
"(\\d+)?(?:\\W(\\d+)?)?" + // line + column
|
||||
"[)\\]]?" // possible closing paren/brace
|
||||
);
|
||||
protected static final Pattern patternToDetectAnonymousClasses = Pattern.compile("([\\.\\w]+)((\\$[\\d]+)*(\\$)?)");
|
||||
|
||||
@@ -317,7 +317,7 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
|
||||
private static final Pattern patternToDetectLinesAndColumns = Pattern.compile("(.+?)" + // name, non-greedy matching
|
||||
"(?::|@|,| |#|#L|\\?l=| on line | at line |:?\\(|:?\\[)" + // separator
|
||||
"(\\d+)?(?:(?:\\D)(\\d+)?)?" + // line + column
|
||||
"(\\d+)?(?:\\W(\\d+)?)?" + // line + column
|
||||
"[)\\]]?" // possible closing paren/brace
|
||||
);
|
||||
public static final Pattern patternToDetectAnonymousClasses = Pattern.compile("([\\.\\w]+)((\\$[\\d]+)*(\\$)?)");
|
||||
|
||||
Reference in New Issue
Block a user