Package ghidra.util.extensions
Class ExtensionUtils
java.lang.Object
ghidra.util.extensions.ExtensionUtils
Utilities for finding extensions.
Extension searching is cached. Use reload()
to update the cache.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears any cached extensions.static ExtensionDetails
createExtensionDetailsFromArchive
(ResourceFile resourceFile) static ExtensionDetails
static Set
<ExtensionDetails> static Extensions
static Set
<ExtensionDetails> Returns all archive extensions.static ExtensionDetails
getExtension
(File file, boolean quiet) static ExtensionDetails
getExtension
(String path) static Set
<ExtensionDetails> Returns all installed extensions.static void
Performs extension maintenance.static boolean
install
(ExtensionDetails extension, File file, TaskMonitor monitor) static boolean
isExtension
(File file) Returns true if the given file or directory is a valid ghidra extension.static void
reload()
Clears any cached extensions and searches for extensions.
-
Field Details
-
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
-
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
-
createExtensionDetailsFromArchive
-