mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
cleanup
This commit is contained in:
@@ -187,7 +187,7 @@ public class DefaultChooseByNameItemProvider implements ChooseByNameItemProvider
|
||||
|
||||
private static boolean matchesQualifier(final Object element,
|
||||
@NotNull final ChooseByNameBase base,
|
||||
final List<Pair<String, MinusculeMatcher>> patternsAndMatchers) {
|
||||
@NotNull List<Pair<String, MinusculeMatcher>> patternsAndMatchers) {
|
||||
final String name = base.getModel().getFullName(element);
|
||||
if (name == null) return false;
|
||||
|
||||
@@ -220,6 +220,7 @@ public class DefaultChooseByNameItemProvider implements ChooseByNameItemProvider
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static List<Pair<String, MinusculeMatcher>> getPatternsAndMatchers(String qualifierPattern, final ChooseByNameBase base) {
|
||||
return ContainerUtil.map2List(split(qualifierPattern, base), new Function<String, Pair<String, MinusculeMatcher>>() {
|
||||
@NotNull
|
||||
|
||||
@@ -217,16 +217,8 @@ public class StringUtil extends StringUtilRt {
|
||||
fromIndex = 0;
|
||||
}
|
||||
|
||||
int max = sourceCount - 1;
|
||||
|
||||
for (int i = fromIndex; i <= max; i++) {
|
||||
/* Look for first character. */
|
||||
if (!charsEqualIgnoreCase(where.charAt(i), what)) {
|
||||
while (++i <= max && !charsEqualIgnoreCase(where.charAt(i), what)) ;
|
||||
}
|
||||
|
||||
/* Found first character, now look at the rest of v2 */
|
||||
if (i <= max) {
|
||||
for (int i = fromIndex; i < sourceCount; i++) {
|
||||
if (charsEqualIgnoreCase(where.charAt(i), what)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,10 +128,12 @@ public class IOUtil {
|
||||
public static boolean isAscii(final String str) {
|
||||
for (int i = 0; i != str.length(); ++ i) {
|
||||
final char c = str.charAt(i);
|
||||
if (c < 0 || c >= 128) {
|
||||
return false;
|
||||
}
|
||||
if (!isAscii(c)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isAscii(char c) {
|
||||
return c >= 0 && c < 128;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user