platform: don't throw exception when creating Single/MultipleRootFileProvider for injected contents

This is temporary needed to avoid exceptions in some plugins (e.g. KT-22929) in IDEA 2018.1. In IDEA 2018.2 the exception will be restored and the problem will be fixed in the plugins properly.
This commit is contained in:
nik
2018-02-26 16:31:44 +03:00
parent 0a57aba09e
commit 2ac622e817
@@ -93,7 +93,7 @@ public abstract class AbstractFileViewProvider extends UserDataHolderBase implem
virtualFile.putUserData(FREE_THREADED, isFreeThreaded(this));
myFileType = type;
if (virtualFile instanceof VirtualFileWindow && !(this instanceof FreeThreadedFileViewProvider)) {
throw new IllegalArgumentException("Must not create "+getClass()+" for injected file "+virtualFile+"; InjectedFileViewProvider must be used instead");
LOG.warn("Must not create "+getClass()+" for injected file "+virtualFile+"; InjectedFileViewProvider must be used instead");
}
}