Package ghidra.framework.main.datatable
Class ProjectDataContext
java.lang.Object
docking.DefaultActionContext
ghidra.framework.main.datatable.ProjectDataContext
- All Implemented Interfaces:
ActionContext,DomainFileContext
- Direct Known Subclasses:
FrontEndProjectTreeContext
A context that understands files that live in a
Project. Most of the clients of
this context will use its notion of selected DomainFiles and folders.-
Constructor Summary
ConstructorsConstructorDescriptionProjectDataContext(ComponentProvider provider, ProjectData projectData, Object contextObject, List<DomainFolder> selectedFolders, List<DomainFile> selectedFiles, Component comp, boolean isActiveProject) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the count of selected filesintThe selected files or empty if no files are selectedbooleanbooleanbooleanTrue if the current set of files is in the active project (false implies a non-active, read-only project)booleanMethods inherited from class docking.DefaultActionContext
getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceComponent, setSourceObject, toString
-
Constructor Details
-
ProjectDataContext
public ProjectDataContext(ComponentProvider provider, ProjectData projectData, Object contextObject, List<DomainFolder> selectedFolders, List<DomainFile> selectedFiles, Component comp, boolean isActiveProject)
-
-
Method Details
-
getSelectedFiles
Description copied from interface:DomainFileContextThe selected files or empty if no files are selected- Specified by:
getSelectedFilesin interfaceDomainFileContext- Returns:
- the files
-
getSelectedFolders
-
hasExactlyOneFileOrFolder
public boolean hasExactlyOneFileOrFolder() -
getFolderCount
public int getFolderCount() -
getFileCount
public int getFileCount()Description copied from interface:DomainFileContextReturns the count of selected files- Specified by:
getFileCountin interfaceDomainFileContext- Returns:
- the count of selected files
-
getProjectData
-
getComponent
-
isInActiveProject
public boolean isInActiveProject()Description copied from interface:DomainFileContextTrue if the current set of files is in the active project (false implies a non-active, read-only project)- Specified by:
isInActiveProjectin interfaceDomainFileContext- Returns:
- true if in the active project
-
isReadOnlyProject
public boolean isReadOnlyProject() -
hasOneOrMoreFilesAndFolders
public boolean hasOneOrMoreFilesAndFolders() -
containsRootFolder
public boolean containsRootFolder()
-