@Override
		public int getIndexOfFirstMatchingEntry(List<CategoryPath> dataCollection, String text) {
			int lastPreferredMatchIndex = -1;
			for (int i = 0; i < data.size(); i++) {
				CategoryPath dataType = data.get(i);
				String dataTypeName = dataType.getName();
				dataTypeName = dataTypeName.replaceAll(" ", "");
				if (dataTypeName.equals(text)) {
					// an exact match is the best possible match!
					return i;
				}

				if (dataTypeName.equalsIgnoreCase(text)) {
					// keep going, but remember this location, in case we don't find any more matches
					lastPreferredMatchIndex = i;
				}
				else {
					// we've encountered a non-matching entry--nothing left to search
					return lastPreferredMatchIndex;
				}
			}

			return -1; // we only get here when the list is empty
		}
CategoryPathDropDownSelectionDataModel class handles the display and selection of a 
Category Path.
Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/CategoryPathSelectionEditor.java