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 Summary
ConstructorsConstructorDescriptionProjectJarManager(Generator generator) ProjectJarManager(Generator generator, List<GeneratorGradleCache.ClasspathEntry> classPathEntries, File javaHome) -
Method Summary
Modifier and TypeMethodDescriptionList<org.fife.rsta.ac.java.buildpath.LibraryInfo> getSourceCodeForClass(String classFqdn) Reads the source code of the given class from the source location registered for it with this jar manager.voidvoidMakes code completion re-read workspace source files it presents (javadoc, parameter names).Methods inherited from class org.fife.rsta.ac.java.JarManager
addClassFileSource, addClassFileSource, addCompletions, addCurrentJreClassFileSource, clearClassFileSources, getCheckModifiedDatestamps, getClassEntry, getClassesInPackage, getClassesWithUnqualifiedName, getClassFileSources, getSourceLocForClass, removeClassFileSource, removeClassFileSource, setCheckModifiedDatestamps
-
Constructor Details
-
ProjectJarManager
-
ProjectJarManager
public ProjectJarManager(Generator generator, List<GeneratorGradleCache.ClasspathEntry> classPathEntries, @Nullable File javaHome) throws GradleCacheImportFailedException - Throws:
GradleCacheImportFailedException
-
-
Method Details
-
getClasspath
-
getJavaHome
-
getJavaReleaseInfo
-
refreshWorkspaceClassInfo
public void refreshWorkspaceClassInfo() -
refreshWorkspaceSourceInfo
public void refreshWorkspaceSourceInfo()Makes code completion re-read workspace source files it presents (javadoc, parameter names). UnlikerefreshWorkspaceClassInfo(), 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
- Returns:
- Same as
JarManager.getClassFileSources(), but without theWorkspaceLibraryInfoentry: 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
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.
-