Class DataTreeClipboardUtils

java.lang.Object
ghidra.framework.main.datatree.DataTreeClipboardUtils

public class DataTreeClipboardUtils extends Object
Manages Ghidra integration with the system clipboard when doing cut/copy/paste operations on domainFiles and domainFolders in a data tree widget.

  • Constructor Details

    • DataTreeClipboardUtils

      public DataTreeClipboardUtils()
  • Method Details

    • setClipboardContents

      public static void setClipboardContents(DataTree tree, TreePath[] paths)
      Pushes the GTreeNodes in the specified TreePath array to the clipboard.
      Parameters:
      tree - DataTree that contains the GTreeNodes
      paths - array of TreePaths containing nodes to be pushed to clipboard.
    • clearCuttables

      public static void clearCuttables()
      Clears the isCut flag on any GTreeNodes that are pointed to by the system clipboard.
    • clearCuttables

      public static void clearCuttables(Transferable transferable)
      Clears the isCut flag on any GTreeNodes that are pointed to by the specified Transferable
      Parameters:
      transferable - contains clipboard contents
    • isCuttablePresent

      public static boolean isCuttablePresent()
      Returns true if the system clipboard has any GTreeNodes that have the Cuttable.isCut() flag set.
      Returns:
      boolean true if there are any cut nodes in the clipboard
    • getDataTreeNodesFromClipboard

      public static List<GTreeNode> getDataTreeNodesFromClipboard()
      Fetches any GTreeNodes from the system clipboard.
      Returns:
      List of GTreeNodes that were in the system clipboard, or empty list if no nodes or some other access error.