trying to load custom plugin in tests

This commit is contained in:
Dmitry Avdeev
2012-02-28 11:01:57 +04:00
parent 43f118b136
commit 03fc41d577
3 changed files with 8 additions and 1 deletions
@@ -1049,7 +1049,7 @@ public class PluginManager {
PluginId pluginId = pluginDescriptor.getPluginId();
File pluginRoot = pluginDescriptor.getPath();
if (isUnitTestMode()) return null;
if (classPath.length == 0) return null;
try {
final List<URL> urls = new ArrayList<URL>(classPath.length);
for (File aClassPath : classPath) {
@@ -416,6 +416,7 @@ public class FSRecords implements Forceable {
myRecords.close();
myRecords = null;
}
ourInitialized = false;
}
private static void markClean() {
@@ -25,6 +25,7 @@ import com.intellij.util.io.URLUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.io.*;
import java.net.URL;
@@ -429,4 +430,9 @@ public class PathManager {
}
return new File(getHomePath() + File.separator + "community" + File.separator + "lib" + File.separator + relativePath);
}
@TestOnly
public static void cleanup() {
ourPluginsPath = null;
}
}