private List<DockingActionIf> createNavigationActions() {

		DataTypeManager lastDtm = null;
		List<DockingActionIf> results = new ArrayList<>();
		List<DataTypeUrl> types =
			isNext ? history.getNextHistoryItems() : history.getPreviousHistoryItems();

		for (DataTypeUrl url : types) {

			DataType dt = url.getDataType(provider.getPlugin());
			if (dt == null) {
				// The type may have been removed; maybe an undo happened.  Leave the item in
				// the list in case a redo is performed
				continue;
			}

			DataTypeManager dtm = dt.getDataTypeManager();
			if (dtm != lastDtm && !results.isEmpty()) {
				// add a separator to show the user they are navigating across managers
				results.add(createHorizontalRule(lastDtm, dtm));
			}

			results.add(new NavigationAction(url, dt));
			lastDtm = dtm;
		}

		return results;
	}
An action to navigate backwards or forwards in the history of data types
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/NextPreviousDataTypeAction.java