public ProgramDnDTree getTree() {
		ViewProviderService viewProvider = provider.getCurrentViewProvider();
		if (!(viewProvider instanceof TreeViewProvider treeProvider)) {
			return null;
		}

		ProgramTreePanel treePanel = treeProvider.getViewComponent();
		return treePanel.getDnDTree();
	}
A context object for the {@link ProgramTreePlugin}.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionContext.java