private void checkAddedNoteBookmark(TaskMonitor monitor, Address addr, Bookmark currentBookmark)
			throws CancelledException {
		String myType = currentBookmark.getTypeString();
		String myCategory = currentBookmark.getCategory();
		String myComment = currentBookmark.getComment();
		// We only allow one NOTE bookmark.
		Bookmark[] original = originalBookmarkMgr.getBookmarks(addr, myType);
		if (original.length > 1) {
			throw new AssertException(
				"Error in CHECKED OUT program - Shouldn't be multiple notes at a single address. Address=" +
					addr.toString());
		}
		if (original.length == 0) {
			// MY added this bookmark
			Bookmark[] latest = latestBookmarkMgr.getBookmarks(addr, myType);
			if (latest.length > 1) {
				throw new AssertException(
					"Error in LATEST checked in program - Shouldn't be multiple notes at a single address. Address=" +
						addr.toString());
			}
			else if (latest.length == 0) {
				// MY added
				merge(addr, myType, null, KEEP_MY, monitor);
			}
			else if (latest.length == 1) {
				String latestCategory = latest[0].getCategory();
				String latestComment = latest[0].getComment();
				if (!SystemUtilities.isEqual(myCategory, latestCategory) ||
					!SystemUtilities.isEqual(myComment, latestComment)) {
					// MY & LATEST added different NOTEs, so conflict.
					addConflict(addr, myType, null);
				}
			}
		}
	}
Constructs a comments merger.
@param listingMergeMgr the listing merge manager that owns this merger.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/BookmarkMerger.java