public final Bookmark createBookmark(Address address, String category, String note) {

		// enforce one bookmark per address, as this is what the UI does
		Bookmark[] existingBookmarks = getBookmarks(address);
		if (existingBookmarks != null && existingBookmarks.length > 0) {
			existingBookmarks[0].set(category, note);
			return existingBookmarks[0];
		}

		BookmarkManager bkm = currentProgram.getBookmarkManager();
		return bkm.setBookmark(address, BookmarkType.NOTE, category, note);
	}
Creates a <code>NOTE</code> bookmark at the specified address
<br>
NOTE: if a <code>NOTE</code> bookmark already exists at the address, it will be replaced.
This is intentional and is done to match the behavior of setting bookmarks from the UI.

@param address  the address to create the bookmark
@param category the bookmark category (it may be null)
@param note  the bookmark text
@return the newly created bookmark
Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java