mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file) Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
22 lines
566 B
Java
22 lines
566 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class X {
|
|
static String guessTestDataName(String method, String testName, String[] methods) {
|
|
for (String psiMethod : methods) {
|
|
String strings = newMethod(method, testName);
|
|
if (strings != null) return strings;
|
|
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Nullable
|
|
private static String newMethod(String method, String testName) {
|
|
String strings = method;
|
|
if (strings != null && !strings.isEmpty()) {
|
|
return strings.substring(0) + testName;
|
|
}
|
|
return null;
|
|
}
|
|
}
|