protected List<FieldElement> createFunctionTagElements(FunctionDB function) {

		Collection<String> tagNames = getTags(function);
		if (tagNames == null || tagNames.isEmpty()) {
			return null;
		}

		ArrayList<FieldElement> textElements = new ArrayList<>();
		AttributedString as;
		int elementIndex = 0;

		as = new AttributedString("Tags: ", ListingColors.SEPARATOR, getMetrics());
		textElements.add(new TextFieldElement(as, elementIndex++, 0));

		String tagNamesStr = StringUtils.join(tagNames, ", ");
		as = new AttributedString(tagNamesStr, FunctionColors.TAG, getMetrics());
		textElements.add(new TextFieldElement(as, elementIndex++, 0));

		return textElements;
	}
Creates a tags list field to be show at the beginning of each function that shows the tags
assigned to that function. 

@param function the function to retrieve the tags from
@return the elements
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/FunctionTagFieldFactory.java