Refactoring: Rename Adpater to Finder

This commit is contained in:
Nikolay Krasko
2013-03-01 20:17:47 +04:00
parent 49a864846b
commit 39e6abf5e9
2 changed files with 3 additions and 3 deletions
@@ -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;
}
});