Class ProjectJarManager

java.lang.Object
org.fife.rsta.ac.java.JarManager
net.mcreator.java.ProjectJarManager

public class ProjectJarManager extends org.fife.rsta.ac.java.JarManager
  • Constructor Details

  • Method Details

    • getClasspath

      public List<GeneratorGradleCache.ClasspathEntry> getClasspath()
    • getJavaHome

      @Nullable public File getJavaHome()
    • getJavaReleaseInfo

      @Nullable public JavaReleaseInfo getJavaReleaseInfo()
    • refreshWorkspaceClassInfo

      public void refreshWorkspaceClassInfo()
    • refreshWorkspaceSourceInfo

      public void refreshWorkspaceSourceInfo()
      Makes code completion re-read workspace source files it presents (javadoc, parameter names). Unlike refreshWorkspaceClassInfo(), the compiled class list is not re-indexed, so this is the right call for the case when workspace source files change without a Gradle task run, e.g., on code editor save. To be called on the EDT.
    • getExternalClassFileSources

      public List<org.fife.rsta.ac.java.buildpath.LibraryInfo> getExternalClassFileSources()
      Returns:
      Same as JarManager.getClassFileSources(), but without the WorkspaceLibraryInfo entry: compiled classes of the workspace itself are registered with this jar manager for code completion purposes, but they are not an external library of the workspace.
    • getSourceCodeForClass

      @Nullable public String getSourceCodeForClass(String classFqdn)
      Reads the source code of the given class from the source location registered for it with this jar manager. Both ZIP/JAR and directory-based source locations are supported.

      Workspace classes are readable even before they are compiled: if the class is not indexed (the class list is built from compiled classes), the workspace source location is probed on disk directly, so sources of freshly generated classes are found too.

      Parameters:
      classFqdn - Fully qualified name of the class to read the source code of.
      Returns:
      Source code of the given class, or null if there is no source location for it or the source location does not contain it.