Class ExtensionUtils
java.lang.Object
ghidra.util.extensions.ExtensionUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
ChangeModifier and TypeMethodDescriptionstatic voidClears any cached extensions.static ExtensionDetailsstatic Set<ExtensionDetails> Returns all installed extensions that are not marked for uninstall.static Extensionsstatic Set<ExtensionDetails> Returns all archive extensions.static ExtensionDetailsgetExtension(File file, boolean quiet) static ExtensionDetailsgetExtension(String path) static Set<ExtensionDetails> Returns all installed extensions.static voidPerforms extension maintenance.static booleaninstall(ExtensionDetails extension, File file, TaskMonitor monitor) static booleanisExtension(File file) Returns true if the given file or directory is a valid ghidra extension.static voidreload()Clears any cached extensions and searches for extensions.
-
Field Details
-
MAX_ZIP_ENTRIES_OVERRIDE_PROPERTY NEW
A property that is used to override theMAX_ZIP_ENTRIES_DEFAULTvalue- See Also:
-
PROPERTIES_FILE_NAME
-
PROPERTIES_FILE_NAME_UNINSTALLED
-
-
Constructor Details
-
ExtensionUtils
public ExtensionUtils()
-
-
Method Details
-
initializeExtensions
public static void initializeExtensions()Performs extension maintenance. This should be called at startup, before any plugins or extension points are loaded. -
getExtension
-
isExtension
Returns true if the given file or directory is a valid ghidra extension.Note: This means that the zip or directory contains an extension.properties file.
- Parameters:
file- the zip or directory to inspect- Returns:
- true if the given file represents a valid extension
-
install
-
getActiveInstalledExtensions
Returns all installed extensions that are not marked for uninstall.- Returns:
- all installed extensions that are not marked for uninstall
-
getInstalledExtensions
Returns all installed extensions. These are all the extensions found inApplicationLayout.getExtensionInstallationDirs().- Returns:
- set of installed extensions
-
getAllInstalledExtensions
-
getExtension
-
reload
public static void reload()Clears any cached extensions and searches for extensions. -
clearCache
public static void clearCache()Clears any cached extensions. -
getArchiveExtensions
Returns all archive extensions. These are all the extensions found inApplicationLayout.getExtensionArchiveDir(). This are added to an installation as part of the build processes.Archived extensions may be zip files and directories.
- Returns:
- set of archive extensions
-
createExtensionFromProperties
-