Package ghidra.plugins.fsbrowser
Class FSBActionContext
java.lang.Object
docking.DefaultActionContext
ghidra.plugins.fsbrowser.FSBActionContext
- All Implemented Interfaces:
ActionContext
FileSystemBrowserPlugin
-specific action.-
Constructor Summary
ConstructorDescriptionFSBActionContext
(ghidra.plugins.fsbrowser.FileSystemBrowserComponentProvider provider, FSBNode[] selectedNodes, MouseEvent event, GTree gTree) Creates a newFileSystemBrowserPlugin
-specific action context. -
Method Summary
Modifier and TypeMethodDescriptionReturns the FSRL of the currently selected file nodeReturns a list of FSRLs of the currently selected file nodes in the tree.Converts the tree-node hierarchy of the currently selected item into a string path using "/" separators.getFSRL
(boolean dirsOk) Returns theFSRL
of the currently selected item, as long as it conforms to the dirsOk requirement.getFSRLs
(boolean dirsOk) Returns a list of FSRLs of the currently selected nodes in the tree.Returns the FSRL of the currently selected item, if it is a 'loadable' item.Returns a list of FSRLs of the currently selected loadable items.Returns the FSBRootNode that contains the currently selected tree node.int
Returns the number of selected nodes in the tree.Returns the currently selected tree nodeReturns a list of the currently selected tree nodes.getTree()
Gets theFileSystemBrowserPlugin
provider's tree.boolean
Returns true if there are selected nodes in the browser tree.boolean
isBusy()
Returns true if the GTree is busyboolean
Returns true if the currently selected items are all directory itemsboolean
notBusy()
Returns true if the GTree is not busyMethods inherited from class docking.DefaultActionContext
getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceObject, toString
-
Constructor Details
-
FSBActionContext
public FSBActionContext(ghidra.plugins.fsbrowser.FileSystemBrowserComponentProvider provider, FSBNode[] selectedNodes, MouseEvent event, GTree gTree) Creates a newFileSystemBrowserPlugin
-specific action context.- Parameters:
provider
- the ComponentProvider that generated this context.selectedNodes
- selected nodes in the treeevent
- MouseEvent that caused the update, or nullgTree
-FileSystemBrowserPlugin
provider tree.
-
-
Method Details
-
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
Gets theFileSystemBrowserPlugin
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
Returns a list of the currently selected tree nodes.- Returns:
- list of currently selected tree nodes
-
getFSRL
Returns theFSRL
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
Returns the currently selected tree node- Returns:
- the currently selected tree node, or null if no nodes or more than 1 node is selected
-
getRootOfSelectedNode
Returns the FSBRootNode that contains the currently selected tree node.- Returns:
- FSBRootNode that contains the currently selected tree node, or null nothing 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
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
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
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
-
getFormattedTreePath
Converts the tree-node hierarchy of the currently selected item into a string path using "/" separators.- Returns:
- string path of the currently selected tree item
-
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
-
getLoadableFSRLs
Returns a list of FSRLs of the currently selected loadable items.- Returns:
- list of FSRLs of currently selected loadable items, maybe empty but never null
-