Class FSBActionContext

java.lang.Object
docking.DefaultActionContext
ghidra.plugins.fsbrowser.FSBActionContext
All Implemented Interfaces:
ActionContext

public class FSBActionContext extends DefaultActionContext
FSBComponentProvider context for actions
  • Constructor Details

  • Method Details

    • getComponentProvider

      public FSBComponentProvider getComponentProvider()
      Specified by:
      getComponentProvider in interface ActionContext
      Overrides:
      getComponentProvider in class DefaultActionContext
    • getContextObject

      public List<FSBNode> getContextObject()
      Description copied from interface: ActionContext
      Returns the object that was included by the ComponentProvider when this context was created.
      Specified by:
      getContextObject in interface ActionContext
      Overrides:
      getContextObject in class DefaultActionContext
      Returns:
      the object that was included by the ComponentProvider when this context was created.
    • getSourceComponent

      public GTree getSourceComponent()
      Description copied from interface: ActionContext
      Returns the component that is the target of this context. This value should not change whether the context is triggered by a key binding or mouse event.
      Specified by:
      getSourceComponent in interface ActionContext
      Overrides:
      getSourceComponent in class DefaultActionContext
      Returns:
      the component; may be null
    • notBusy

      public boolean notBusy()
      Returns true if the GTree is not busy
      Returns:
      boolean true if GTree is not busy
    • isBusy

      public boolean isBusy()
      Returns true if the GTree is busy
      Returns:
      boolean true if the GTree is busy
    • getTree

      public GTree getTree()
      Gets the FileSystemBrowserPlugin provider's tree.
      Returns:
      The FileSystemBrowserPlugin provider's tree.
    • hasSelectedNodes

      public boolean hasSelectedNodes()
      Returns true if there are selected nodes in the browser tree.
      Returns:
      boolean true if there are selected nodes in the browser tree
    • getSelectedNodes

      public List<FSBNode> getSelectedNodes()
      Returns a list of the currently selected tree nodes.
      Returns:
      list of currently selected tree nodes
    • getFSRL

      public FSRL getFSRL(boolean dirsOk)
      Returns the FSRL of the currently selected item, as long as it conforms to the dirsOk requirement.
      Parameters:
      dirsOk - boolean flag, if true the selected item can be either a file or directory element, if false, it must be a file or the root of a file system that has a container file
      Returns:
      FSRL of the single selected item, null if no items selected or more than 1 item selected
    • isSelectedAllDirs

      public boolean isSelectedAllDirs()
      Returns true if the currently selected items are all directory items
      Returns:
      boolean true if the currently selected items are all directory items
    • getSelectedNode

      public FSBNode getSelectedNode()
      Returns the currently selected tree node
      Returns:
      the currently selected tree node, or null if no nodes or more than 1 node is selected
    • getSelectedCount

      public int getSelectedCount()
      Returns the number of selected nodes in the tree.
      Returns:
      returns the number of selected nodes in the tree.
    • getFSRLs

      public List<FSRL> getFSRLs(boolean dirsOk)
      Returns a list of FSRLs of the currently selected nodes in the tree.
      Parameters:
      dirsOk - boolean flag, if true the selected items can be either a file or directory element, if false, it must be a file or the root of a file system that has a container file before being included in the resulting list
      Returns:
      list of FSRLs of the currently selected items, maybe empty but never null
    • getFileFSRLs

      public List<FSRL> getFileFSRLs()
      Returns a list of FSRLs of the currently selected file nodes in the tree.
      Returns:
      list of FSRLs of the currently selected file items, maybe empty but never null
    • getFileFSRL

      public FSRL getFileFSRL()
      Returns the FSRL of the currently selected file node
      Returns:
      FSRL of the currently selected file, or null if not file or more than 1 selected
    • getLoadableFSRL

      public FSRL getLoadableFSRL()
      Returns the FSRL of the currently selected item, if it is a 'loadable' item.
      Returns:
      FSRL of the currently selected loadable item, or null if nothing selected or more than 1 selected
    • hasSelectedLinkedNodes

      public boolean hasSelectedLinkedNodes()