Package ghidra.plugins.fsbrowser
Class FSBActionContext
- java.lang.Object
-
- docking.ActionContext
-
- ghidra.plugins.fsbrowser.FSBActionContext
-
public class FSBActionContext extends ActionContext
FileSystemBrowserPlugin
-specific action.
-
-
Constructor Summary
Constructors Constructor Description FSBActionContext(ghidra.plugins.fsbrowser.FileSystemBrowserComponentProvider provider, FSBNode[] selectedNodes, java.awt.event.MouseEvent event, GTree gTree)
Creates a newFileSystemBrowserPlugin
-specific action context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FSRL
getFileFSRL()
Returns the FSRL of the currently selected file nodejava.util.List<FSRL>
getFileFSRLs()
Returns a list of FSRLs of the currently selected file nodes in the tree.java.lang.String
getFormattedTreePath()
Converts the tree-node hierarchy of the currently selected item into a string path using "/" separators.FSRL
getFSRL(boolean dirsOk)
Returns theFSRL
of the currently selected item, as long as it conforms to the dirsOk requirement.java.util.List<FSRL>
getFSRLs(boolean dirsOk)
Returns a list of FSRLs of the currently selected nodes in the tree.FSRL
getLoadableFSRL()
Returns the FSRL of the currently selected item, if it is a 'loadable' item.java.util.List<FSRL>
getLoadableFSRLs()
Returns a list of FSRLs of the currently selected loadable items.FSBRootNode
getRootOfSelectedNode()
Returns the FSBRootNode that contains the currently selected tree node.int
getSelectedCount()
Returns the number of selected nodes in the tree.FSBNode
getSelectedNode()
Returns the currently selected tree nodejava.util.List<FSBNode>
getSelectedNodes()
Returns a list of the currently selected tree nodes.GTree
getTree()
Gets theFileSystemBrowserPlugin
provider's tree.boolean
hasSelectedNodes()
Returns true if there are selected nodes in the browser tree.boolean
isBusy()
Returns true if the GTree is busyboolean
isSelectedAllDirs()
Returns true if the currently selected items are all directory itemsboolean
notBusy()
Returns true if the GTree is not busy-
Methods inherited from class docking.ActionContext
getComponentProvider, getContextObject, getGlobalContext, getMouseEvent, getSourceComponent, getSourceObject, setContextObject, setMouseEvent, setSourceObject, toString
-
-
-
-
Constructor Detail
-
FSBActionContext
public FSBActionContext(ghidra.plugins.fsbrowser.FileSystemBrowserComponentProvider provider, FSBNode[] selectedNodes, java.awt.event.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 Detail
-
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 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
public java.util.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 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
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
-
getRootOfSelectedNode
public FSBRootNode 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
public java.util.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 java.util.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
-
getFormattedTreePath
public java.lang.String 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
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
-
getLoadableFSRLs
public java.util.List<FSRL> 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
-
-