Package ghidra.framework.main.datatable
Class ProjectDataContext
- java.lang.Object
 - 
- docking.ActionContext
 - 
- ghidra.framework.main.datatable.ProjectDataContext
 
 
 
- 
- All Implemented Interfaces:
 DomainFileContext
- Direct Known Subclasses:
 FrontEndProjectTreeContext
public class ProjectDataContext extends ActionContext implements DomainFileContext
A context that understands files that live in aProject. Most of the clients of this context will use its notion of selectedDomainFiles and folders. 
- 
- 
Constructor Summary
Constructors Constructor Description ProjectDataContext(ComponentProvider provider, ProjectData projectData, java.lang.Object contextObject, java.util.List<DomainFolder> selectedFolders, java.util.List<DomainFile> selectedFiles, java.awt.Component comp, boolean isActiveProject) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsRootFolder()java.awt.ComponentgetComponent()intgetFileCount()Returns the count of selected filesintgetFolderCount()ProjectDatagetProjectData()java.util.List<DomainFile>getSelectedFiles()The selected files or empty if no files are selectedjava.util.List<DomainFolder>getSelectedFolders()booleanhasExactlyOneFileOrFolder()booleanhasOneOrMoreFilesAndFolders()booleanisInActiveProject()True if the current set of files is in the active project (false implies a non-active, read-only project)booleanisReadOnlyProject()- 
Methods inherited from class docking.ActionContext
getComponentProvider, getContextObject, getGlobalContext, getMouseEvent, getSourceComponent, getSourceObject, setContextObject, setMouseEvent, setSourceObject, toString 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ProjectDataContext
public ProjectDataContext(ComponentProvider provider, ProjectData projectData, java.lang.Object contextObject, java.util.List<DomainFolder> selectedFolders, java.util.List<DomainFile> selectedFiles, java.awt.Component comp, boolean isActiveProject)
 
 - 
 
- 
Method Detail
- 
getSelectedFiles
public java.util.List<DomainFile> getSelectedFiles()
Description copied from interface:DomainFileContextThe selected files or empty if no files are selected- Specified by:
 getSelectedFilesin interfaceDomainFileContext- Returns:
 - the files
 
 
- 
getSelectedFolders
public java.util.List<DomainFolder> 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
public ProjectData getProjectData()
 
- 
getComponent
public java.awt.Component 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()
 
 - 
 
 -