AddressSet getView() {
		if (program == null) {
			return new AddressSet();
		}
		AddressSet set = new AddressSet();
		GroupPath[] gp = treePanel.getViewedGroups();
		if (gp == null || program == null) {
			return set;
		}
		String treeName = treePanel.getTreeName();
		for (GroupPath element : gp) {
			Group group = element.getGroup(program, treeName);
			if (group == null) {
				continue;
			}
			// recursively go through module to build up address set
			getAddressSet(group, set);
		}
		return set;
	}
Get the program tree object.
@return ProgramDnDTree
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/TreeViewProvider.java