All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arrow.meta.phases.analysis.MetaFileViewProvider.kt Maven / Gradle / Ivy

There is a newer version: 1.6.3-alpha.2
Show newest version
package arrow.meta.phases.analysis

import org.jetbrains.kotlin.com.intellij.openapi.editor.Document
import org.jetbrains.kotlin.com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.kotlin.com.intellij.psi.PsiManager
import org.jetbrains.kotlin.com.intellij.psi.SingleRootFileViewProvider

/**
 * Provides interception access to the internals of a [VirtualFile] allowing to replace its
 * [Document]
 */
class MetaFileViewProvider(
  psiManager: PsiManager,
  virtualFile: VirtualFile,
  val transformation: (Document?) -> Document?
) : SingleRootFileViewProvider(psiManager, virtualFile) {
  override fun getDocument(): Document? = transformation(super.getDocument())
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy