Package ghidra.framework.main.datatree
Class DataTreeClipboardUtils
java.lang.Object
ghidra.framework.main.datatree.DataTreeClipboardUtils
Manages Ghidra integration with the system clipboard when doing cut/copy/paste
operations on domainFiles and domainFolders in a data tree widget.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears theisCut
flag on any GTreeNodes that are pointed to by the system clipboard.static void
clearCuttables
(Transferable transferable) Clears theisCut
flag on any GTreeNodes that are pointed to by the specifiedTransferable
Fetches any GTreeNodes from the system clipboard.static boolean
Returns true if the system clipboard has any GTreeNodes that have theCuttable.isCut()
flag set.static void
setClipboardContents
(DataTree tree, TreePath[] paths) Pushes the GTreeNodes in the specified TreePath array to the clipboard.
-
Constructor Details
-
DataTreeClipboardUtils
public DataTreeClipboardUtils()
-
-
Method Details
-
setClipboardContents
Pushes the GTreeNodes in the specified TreePath array to the clipboard.- Parameters:
tree
- DataTree that contains the GTreeNodespaths
- array of TreePaths containing nodes to be pushed to clipboard.
-
clearCuttables
public static void clearCuttables()Clears theisCut
flag on any GTreeNodes that are pointed to by the system clipboard. -
clearCuttables
Clears theisCut
flag on any GTreeNodes that are pointed to by the specifiedTransferable
- Parameters:
transferable
- contains clipboard contents
-
isCuttablePresent
public static boolean isCuttablePresent()Returns true if the system clipboard has any GTreeNodes that have theCuttable.isCut()
flag set.- Returns:
- boolean true if there are any cut nodes in the clipboard
-
getDataTreeNodesFromClipboard
Fetches any GTreeNodes from the system clipboard.- Returns:
- List of
GTreeNode
s that were in the system clipboard, or empty list if no nodes or some other access error.
-