Increase file size limit of compiler to 20 (was 2.5) megabytes (compiler will not read files larger than that)

Current IDEA api makes it possible to increase that to a higher value only by passing system property on compiler startup
This commit is contained in:
Pavel V. Talanov
2015-12-15 18:14:04 +03:00
parent 8d5d1b7dcc
commit 56cd29dff2
6 changed files with 174 additions and 28 deletions
@@ -35,7 +35,9 @@ import com.intellij.openapi.fileTypes.PlainTextFileType
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.io.FileUtilRt
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.PersistentFSConstants
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.psi.FileContextProvider
import com.intellij.psi.PsiElementFinder
@@ -111,6 +113,10 @@ public class KotlinCoreEnvironment private constructor(
it
}
init {
PersistentFSConstants.setMaxIntellisenseFileSize(FileUtilRt.LARGE_FOR_CONTENT_LOADING)
}
init {
val project = projectEnvironment.getProject()
project.registerService(javaClass<DeclarationProviderFactoryService>(), CliDeclarationProviderFactoryService(sourceFiles))