use of org.jetbrains.annotations.TestOnly in project intellij-plugins by JetBrains.
the class LibraryUtil method getTestGlobalLibrary.
@TestOnly
static // we cannot use LocalFileSystem, because our test can run outside the idea
VirtualFile getTestGlobalLibrary(boolean isPlayer) {
String name = (isPlayer ? "player" : "air") + "-catalog.xml";
File file = new File(DebugPathManager.getTestDataPath() + "/lib/playerglobal", name);
assert file.exists();
try {
return new LightVirtualFile(name, XmlFileType.INSTANCE, IOUtil.getCharSequence(file), StandardCharsets.UTF_8, 0);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Aggregations