@Override
	public void readDataState(SaveState saveState) {

		int numberOfViews = saveState.getInt(NUMBER_OF_VIEWS, 0);

		ArrayList<TreeViewProvider> viewList = new ArrayList<>();

		String[] treeNames = new String[numberOfViews];
		for (int i = 0; i < numberOfViews; i++) {
			treeNames[i] = saveState.getString(TREE_NAME + "-" + i, null);
		}

		List<TreeViewProvider> providerList = new ArrayList<>();
		for (String element : treeNames) {
			TreeViewProvider provider = providerMap.get(element);
			if (provider != null) {
				providerList.add(provider);
			}
		}

		for (String treeName : treeNames) {
			TreeViewProvider provider = providerMap.get(treeName);
			if (!treeExists(treeName)) {
				if (provider != null) {
					deregisterService(TreeViewProvider.class, provider);
					providerMap.remove(treeName);
					provider = null;
				}
			}
			else if (provider == null) {
				provider = addTreeView(treeName);
			}
			if (provider != null) {
				reloadTree(provider.getProgramDnDTree(), true);
				provider.readDataState(saveState);
				viewList.add(provider);
			}
		}
		removeStaleProviders(viewList);

		// If nothing is showing, then display the first program tree found.
		if (viewList.isEmpty()) {
			addTreeViews();
		}

		selectionToggleAction.setSelected(saveState.getBoolean(TOGGLE_STATE, true));

		restoreTreeViews();

		componentProvider.readDataState(saveState);
	}
Read the data for the plugin upon deserialization; reads what should be
the current selection in the tree.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreePlugin.java