// caused issues https://github.com/holgerbrandl/r4intellij/issues/79
@Deprecated // caused issues https://github.com/holgerbrandl/r4intellij/issues/79
    private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) {
        final ArrayList<String> result = new ArrayList<String>();
        for (String path : paths) {
            // does not work in tests
            final VirtualFile rootVDir = LocalFileSystem.getInstance().findFileByPath(path);
            if (rootVDir != null) {
//                final VirtualFile rScript = rootVDir.findFileByRelativePath("bin/" + scriptName);
                final File rScript = findScript(scriptName, path);
                if (rScript != null) {
                    result.add(FileUtil.toSystemDependentName(rScript.getPath()));
                }
            }
        }
        return result;
    }
@Deprecated // caused issues https://github.com/holgerbrandl/r4intellij/issues/79
private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) {
final ArrayList<String> result = new ArrayList<String>();
@Deprecated // caused issues https://github.com/holgerbrandl/r4intellij/issues/79
private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) {
final ArrayList<String> result = new ArrayList<String>();
for (String path : paths) {
// does not work in tests
final VirtualFile rootVDir = LocalFileSystem.getInstance().findFileByPath(path);
if (rootVDir != null) {
// final VirtualFile rScript = rootVDir.findFileByRelativePath("bin/" + scriptName);
final File rScript = findScript(scriptName, path);
if (rScript != null) {
result.add(FileUtil.toSystemDependentName(rScript.getPath()));
@Deprecated // caused issues https://github.com/holgerbrandl/r4intellij/issues/79
private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) {
final ArrayList<String> result = new ArrayList<String>();
for (String path : paths) {
// does not work in tests
final VirtualFile rootVDir = LocalFileSystem.getInstance().findFileByPath(path);
if (rootVDir != null) {
// final VirtualFile rScript = rootVDir.findFileByRelativePath("bin/" + scriptName);
final File rScript = findScript(scriptName, path);
if (rScript != null) {
result.add(FileUtil.toSystemDependentName(rScript.getPath()));
}
}
}
return result;
}