private static final MyClassLoader ourClassLoader = new MyClassLoader();
protected LivePreviewLanguage(@NotNull BnfFile grammarFile) {
super(BASE_INSTANCE, ObjectUtils.assertNotNull(grammarFile.getVirtualFile()).getPath());
VirtualFile virtualFile = ObjectUtils.assertNotNull(grammarFile.getVirtualFile());
Application app = ApplicationManager.getApplication();
if (app.isUnitTestMode()) {
myBnfFile = new SoftReference<BnfFile>(grammarFile);
myFilePointer = null;
}
else {
myFilePointer = VirtualFilePointerManager.getInstance().create(virtualFile, app, null);