GTreeNode getSelectedNode() {

		GTreeNode node = runSwing(() -> {

			TreePath path = tree.getSelectionPath();
			if (path == null) {
				return null;
			}

			return (GTreeNode) path.getLastPathComponent();
		});
		return node;
	}
A comparator to sort Symbols the same way as the SymbolNode sorts
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeTestUtils.java