Class IntelliJEnvironmentImpl

java.lang.Object
net.neoforged.jst.cli.intellij.IntelliJEnvironmentImpl
All Implemented Interfaces:
AutoCloseable, net.neoforged.jst.api.IntelliJEnvironment

public class IntelliJEnvironmentImpl extends Object implements net.neoforged.jst.api.IntelliJEnvironment, AutoCloseable
  • Constructor Details

    • IntelliJEnvironmentImpl

      public IntelliJEnvironmentImpl(net.neoforged.jst.api.Logger logger) throws IOException
      Throws:
      IOException
  • Method Details

    • getPsiManager

      public com.intellij.psi.PsiManager getPsiManager()
      Specified by:
      getPsiManager in interface net.neoforged.jst.api.IntelliJEnvironment
    • getPsiFacade

      public com.intellij.psi.JavaPsiFacade getPsiFacade()
      Specified by:
      getPsiFacade in interface net.neoforged.jst.api.IntelliJEnvironment
    • getAppEnv

      public com.intellij.core.CoreApplicationEnvironment getAppEnv()
      Specified by:
      getAppEnv in interface net.neoforged.jst.api.IntelliJEnvironment
    • getProjectEnv

      public com.intellij.core.JavaCoreProjectEnvironment getProjectEnv()
      Specified by:
      getProjectEnv in interface net.neoforged.jst.api.IntelliJEnvironment
    • addJarToClassPath

      public void addJarToClassPath(Path jarFile)
    • addFolderToClasspath

      public void addFolderToClasspath(Path folder)
    • addSourceRoot

      public void addSourceRoot(com.intellij.openapi.vfs.VirtualFile sourceRoot)
    • addCurrentJdkToClassPath

      public void addCurrentJdkToClassPath()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • parseFileFromMemory

      @VisibleForTesting public com.intellij.psi.PsiFile parseFileFromMemory(String filename, String fileContent)