mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-162418 Enhanced go to file formats
This commit is contained in:
@@ -238,6 +238,8 @@ class Intf {
|
||||
assert getPopupElements(model, 'Bar(2)') == [file]
|
||||
assert getPopupElements(model, 'Bar on line 2') == [file]
|
||||
assert getPopupElements(model, 'Bar at line 2') == [file]
|
||||
assert getPopupElements(model, 'Bar 2:39') == [file]
|
||||
assert getPopupElements(model, 'Bar#L2') == [file]
|
||||
}
|
||||
|
||||
void "test dollar"() {
|
||||
|
||||
@@ -338,8 +338,8 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
}
|
||||
|
||||
private static final Pattern patternToDetectLinesAndColumns = Pattern.compile("(.+?)" + // name, non-greedy matching
|
||||
"(?::|@|,| on line | at line |:?\\(|:?\\[)" + // separator
|
||||
"(\\d+)?(?:(?:\\D)(\\d+)?)?" + // line + column
|
||||
"(?::|@|,| |#L| on line | at line |:?\\(|:?\\[)" + // separator
|
||||
"(\\d+)(?:(?:\\D)(\\d+)?)?" + // line + column
|
||||
"[)\\]]?" // possible closing paren/brace
|
||||
);
|
||||
public static final Pattern patternToDetectAnonymousClasses = Pattern.compile("([\\.\\w]+)((\\$[\\d]+)*(\\$)?)");
|
||||
@@ -353,7 +353,7 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
|
||||
public static String getTransformedPattern(String pattern, ChooseByNameModel model) {
|
||||
Pattern regex = null;
|
||||
if (StringUtil.containsAnyChar(pattern, ":,;@[(") || pattern.contains(" line ")) { // quick test if reg exp should be used
|
||||
if (StringUtil.containsAnyChar(pattern, ":,;@[( #") || pattern.contains(" line ")) { // quick test if reg exp should be used
|
||||
regex = patternToDetectLinesAndColumns;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user