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`

public class ProjectDataContext extends DefaultActionContext implements DomainFileContext
A context that understands files that live in a `Project`. Most of the clients of this context will use its notion of selected `DomainFile`s and folders.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProjectDataContext(ComponentProvider provider, ProjectData projectData, Object contextObject, List<DomainFolder> selectedFolders, List<DomainFile> selectedFiles, Component comp, boolean isActiveProject)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `containsRootFolder()`
  `Component`
  `getComponent()`
  `int`
  `getFileCount()`
  Returns the count of selected files
  `int`
  `getFolderCount()`
  `ProjectData`
  `getProjectData()`
  `List<DomainFile>`
  `getSelectedFiles()`
  The selected files or empty if no files are selected
  `List<DomainFolder>`
  `getSelectedFolders()`
  `boolean`
  `hasExactlyOneFileOrFolder()`
  `boolean`
  `hasOneOrMoreFilesAndFolders()`
  `boolean`
  `isInActiveProject()`
  True if the current set of files is in the active project (false implies a non-active, read-only project)
  `boolean`
  `isReadOnlyProject()`

  ### Methods inherited from class docking.DefaultActionContext

  `getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceObject, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ProjectDataContext

    public ProjectDataContext(ComponentProvider provider, ProjectData projectData, Object contextObject, List<DomainFolder> selectedFolders, List<DomainFile> selectedFiles, Component comp, boolean isActiveProject)

- ## Method Details

  - ### getSelectedFiles

    public List<DomainFile> getSelectedFiles()
    Description copied from interface: `DomainFileContext`
    The selected files or empty if no files are selected
    Specified by:
      `getSelectedFiles` in interface `DomainFileContext`
    Returns:
      the files

  - ### getSelectedFolders

    public List<DomainFolder> getSelectedFolders()

  - ### hasExactlyOneFileOrFolder

    public boolean hasExactlyOneFileOrFolder()

  - ### getFolderCount

    public int getFolderCount()

  - ### getFileCount

    public int getFileCount()
    Description copied from interface: `DomainFileContext`
    Returns the count of selected files
    Specified by:
      `getFileCount` in interface `DomainFileContext`
    Returns:
      the count of selected files

  - ### getProjectData

    public ProjectData getProjectData()

  - ### getComponent

    public Component getComponent()

  - ### isInActiveProject

    public boolean isInActiveProject()
    Description copied from interface: `DomainFileContext`
    True if the current set of files is in the active project (false implies a non-active, read-only project)
    Specified by:
      `isInActiveProject` in interface `DomainFileContext`
    Returns:
      true if in the active project

  - ### isReadOnlyProject

    public boolean isReadOnlyProject()

  - ### hasOneOrMoreFilesAndFolders

    public boolean hasOneOrMoreFilesAndFolders()

  - ### containsRootFolder

    public boolean containsRootFolder()