Refactoring: Rename Adpater to Finder
This commit is contained in:
@@ -39,7 +39,7 @@ public class PathUtil {
|
||||
|
||||
private static final File NO_PATH = new File("<no_path>");
|
||||
|
||||
public static final Function<String, File> KOTLIN_HOME_DIRECTORY_ADAPTER = new Function<String, File>() {
|
||||
public static final Function<String, File> KOTLIN_HOME_DIRECTORY_FINDER = new Function<String, File>() {
|
||||
private final Pattern homeDirPattern = Pattern.compile(HOME_FOLDER_NAME);
|
||||
private final Pattern buildFilePattern = Pattern.compile(BUILD_VERSION_NAME);
|
||||
|
||||
@@ -116,7 +116,7 @@ public class PathUtil {
|
||||
|
||||
@NotNull
|
||||
public static KotlinPaths getKotlinStandaloneCompilerPaths(@NotNull String path) {
|
||||
File homePath = KOTLIN_HOME_DIRECTORY_ADAPTER.fun(path);
|
||||
File homePath = KOTLIN_HOME_DIRECTORY_FINDER.fun(path);
|
||||
if (homePath == null) {
|
||||
throw new IllegalArgumentException(String.format("Can't get home path from '%s'", path));
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ChooseCompilerSourcePanel {
|
||||
return false;
|
||||
}
|
||||
|
||||
return PathUtil.KOTLIN_HOME_DIRECTORY_ADAPTER.fun(com.intellij.util.PathUtil.getLocalPath(file)) != null;
|
||||
return PathUtil.KOTLIN_HOME_DIRECTORY_FINDER.fun(com.intellij.util.PathUtil.getLocalPath(file)) != null;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user