Package ghidra.plugin.importer
Class ProjectIndexService
java.lang.Object
ghidra.plugin.importer.ProjectIndexService
- All Implemented Interfaces:
DomainFolderChangeListener
,AutoCloseable
public class ProjectIndexService
extends Object
implements DomainFolderChangeListener, AutoCloseable
An in-memory index of FSRL-to-domainfiles.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
void
domainFileAdded
(DomainFile file) Notification that a file is added to parent folder.void
domainFileRemoved
(DomainFolder parent, String name, String fileID) Notification that a file was removedfindFirstByFSRL
(FSRL fsrl) static ProjectIndexService
getIndexFor
(Project project) Returns an index for a Project.lookupFiles
(ProjectIndexService.IndexType keyType, Object keyValue) static void
projectClosed
(Project project) Notify the index instance management that a Project has been closed.void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.framework.model.DomainFolderChangeListener
domainFileMoved, domainFileObjectClosed, domainFileObjectOpenedForUpdate, domainFileRenamed, domainFileStatusChanged, domainFolderAdded, domainFolderMoved, domainFolderRemoved, domainFolderRenamed, domainFolderSetActive
-
Field Details
-
DUMMY
-
-
Constructor Details
-
ProjectIndexService
-
-
Method Details
-
getIndexFor
Returns an index for a Project. Instances returned by this method should not beclosed
by the caller.- Parameters:
project
-Project
to get index for, ornull
for a DUMMY placeholder- Returns:
ProjectIndexService
instance, never null
-
projectClosed
Notify the index instance management that a Project has been closed. Users of this service need to do this because notification of Project closure is only available to GUI Plugin classes.- Parameters:
project
-Project
that was closed
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
addIndexListener
-
removeIndexListener
-
domainFileAdded
Description copied from interface:DomainFolderChangeListener
Notification that a file is added to parent folder. You can get the parent from the file.- Specified by:
domainFileAdded
in interfaceDomainFolderChangeListener
- Parameters:
file
- domain file which was just added.
-
domainFileRemoved
Description copied from interface:DomainFolderChangeListener
Notification that a file was removed- Specified by:
domainFileRemoved
in interfaceDomainFolderChangeListener
- Parameters:
parent
- domain folder which contained the file that was just removed.name
- the name of the file that was removed.fileID
- file ID or null
-
lookupFiles
-
findFirstByFSRL
-